CD-02Cards
Throw Deck
A pile of image cards you drag, flick off the top and send under the deck, with arrow keys and a details view.
PROOnboarding Checklist and more like it are in Kokonut UI Pro
Installation
Throw Deck is a free, open-source React component in the Kokonut UI Cards collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/card-stack.tsx, so the code is yours to change.
npx shadcn@latest add @kokonutui/card-stackOr add it by hand: install its packages, then copy the source from Copy code above into components/kokonutui/card-stack.tsx.
npm install lucide-react motionUsage
import CardStack from "@/components/kokonutui/card-stack";
export default function Example() {
return <CardStack />;
}Props
cardsDeckCard[]Default built-inaccentstringDefault "#f97316"The one accent color, used by the artwork and the primary action.
actionLabelstringDefault "Add to cart"Label of the primary action in the details view.
onAction(card: DeckCard) => voidonChange(card: DeckCard) => voidCalled with the new top card after the deck cycles.
classNamestringExtra classes for the root element.
DeckCard
idrequiredstringtitlerequiredstringsubtitlerequiredstringartrequiredReactNodeArtwork shown edge to edge on the card. Inline SVG keeps it portable.
descriptionrequiredstringspecsrequiredDeckSpec[]pricestringDeckSpec
labelrequiredstringvaluerequiredstringDependencies
| Needs | Version | Comes from |
|---|---|---|
lucide-react | ^0.556.0 | npm, installed by the CLI |
motion | ^12.23.25 | npm, installed by the CLI |
cn from lib/utils.ts | shadcn init | |
| React | 19 | Your app |
| Tailwind CSS | 4 | Your app |
No provider, font or global CSS to set up: the file works as soon as it lands.

