A shadcn-style swap component built with Ark UI primitives.

OFF

Installation

npx shadcn@latest add @ark-cn/swap

Usage

import * as Swap from "@/components/ui/swap"

Read exported parts in src/components/ui/swap.tsx and compose the primitive according to the Ark UI pattern for this component.

Examples

Fade

Flip

Rotate

Scale

Lazy Mount

Off — unmounted when hidden

API reference

This component mirrors the upstream Ark UI primitive.

See the ARK UI documentation for the full API.