ONONC

Card Stack

A draggable deck — throw or click the top card to send it to the back.

motiondraga11y

Styled with ONONC's design tokens shadcn add installs them for you.

Press Enter or Space to send the top card to the back.

Analytics

Realtime insight

Customize

Cards

Card width300px
Card height200px
Stack offset10px
Corner radius18px

Interaction

Throw distance160px

Drag past this to send the top card back.

Random rotation
Click to cycle

Props

PropTypeDefaultDescription
itemsCardStackItem[]gradient setCards in the stack, front to back ({ title, subtitle?, background? }).
cardWidthnumber300Card width in pixels.
cardHeightnumber200Card height in pixels.
sensitivitynumber160Drag distance (px) past which the top card is sent to the back.
offsetnumber10Positional offset per card deeper in the stack, in pixels.
randomRotatebooleantrueApply a small, deterministic per-card rotation.
cycleOnClickbooleanfalseClicking the top card also sends it to the back.
radiusnumber18Card corner radius in pixels.
labelstring"Card stack"Accessible name for the stack.