Fan Deck Carousel
Poster cards fanned around an upright hero card; swipe, arrow keys or buttons re-fan the hand on springs while a blurred copy of the active art crossfades behind.
Try it: Swipe, use ←/→ or click a side card; hover pauses autoplay.
Brings its own background. Paints its own backdrop: a blurred copy of the active card art over off-white (light) or ink (dark), via dark: variants. Override the surface with className (e.g. bg-*, rounded-*).
Installation
Install with the shadcn CLI:
npx shadcn@latest add https://www.framekitui.live/r/fan-deck-carousel.jsonOr, with the @framekit namespace registered: npx shadcn@latest add @framekit/fan-deck-carousel. You can also copy the source into components/ui/fan-deck-carousel.tsx (view on GitHub).
Usage
import { FanDeckCarousel } from '@/components/ui/fan-deck-carousel'Props
| Prop | Type | Default | Notes |
|---|---|---|---|
items | FanDeckItem[] | DEFAULT_FAN_DECK_ITEMS | { id, title, subtitle?, src?, hue? } — src swaps the generated poster for your image. |
headline / description | string | — | Copy above the deck. |
ctaLabel / onCta | string / (item) => void | 'Explore' | Pill CTA; receives the active item. |
autoplay | boolean | true | Advances on an interval; pauses on hover, focus, offscreen and reduced motion. |
interval | number | 4000 | Milliseconds per slide. |
index / defaultIndex / onIndexChange | number / number / (i) => void | 0 | Controlled or uncontrolled active slide. |
Dependencies
motionlucide-react
Related Cards components
- Tide Deck
Drag a deck whose depth reacts to velocity.
- Curved Tile Wall
A gallery bent onto a sphere section in real CSS 3D: mixed-height frames drift, swing with drag, pop toward you on hover and open in a focused lightbox.
- Windowpane Story Card
Frosted pane slides to reveal evidence.
- Lenticular Shift Card
A postcard printed on a ridged lenticular sheet: tilting interlaces the scenes in fine vertical blinds that sweep across the print while a specular band rides the ridges.
- Topographic Stack
Contour-offset layers separate on hover.
- Origami Unfold Card
A trail ticket that unfolds like a paper map: press the cover and two creased panels swing down in sequence on real CSS-3D hinges, catching light as they flatten, while the route draws itself and…