Card Deck

Swipe, click, or press Enter to send the top card to the back.

Install it the shadcn way: copy the source file into your project. It uses CSS 3D, Tailwind CSS v4 and Framer Motion, no WebGL.

CardDeck props

PropTypeDefaultDescription
cardsReactNode[]Cards in the stack, first item on top.
widthnumber300Width of each card in px.
heightnumber190Height of each card in px.
visiblenumber3How many cards are visible behind the top one.
classNamestringExtra classes added to the outer element.

More components

Guides

Start

Cards

Scenes

Controls & text

Buttons

More cards

UI elements

Form controls

App components

Text & backgrounds

Showpieces

Blocks