← All components

Cards

Card Swap

A depth-stacked deck that auto-cycles, sending the front card to the back

Preview

Design

Token-driven, no hardcoded colour.

Build

Copy-paste source, zero required props.

Ship

Reduced-motion aware, 60fps by default.

Bakes #6366f1 directly into the copied source — self-contained.

Install

npx shadcn@latest add https://flux-ui.pro/r/card-swap.json

Source

components/ui/card-swap.tsx

Sign in to reveal the source. Free accounts get 10 a day.

AI prompt

AI prompt

Sign in to reveal the prompt. Free accounts get 10 a day.

Paste this into Cursor, Claude, or any AI editor to drop the component in.