Card dealer
A card table with a face-down deck, a fanned hand and a discard pile. Dealt cards arc off the deck and turn over in flight, played cards arc to the pile, sorting makes the hand's cards hop over each other into order, and collecting sweeps everything back.
When to use
- Card games, quizzes and flash-card study apps.
- Playful onboarding or rewards where cards stand for choices.
When not to use
- Ordinary content cards; this is a table of playing cards.
- Hands of more than about ten cards on a phone; the fan gets too tight to tap.
Installation
pnpm dlx shadcn@latest add @caliper/card-dealer
Adds its 3 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
CardDealer
3 props
Also accepts the native props of its root element and a ref.
cardName
3 props
Keyboard
- No custom key handling; Tab and the native activation keys do the work.
Accessibility
It is built on native elements and keeps aria-hidden, aria-label and aria-live in step with state. Changes that matter are announced through a live region.
Motion
- State changes animate with the library's shared durations and curves, so its timing matches every other part.
- Under reduced motion each change lands on its end state without movement; nothing is hidden or skipped.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/card-dealer.mdThe index of every part is at /llms.txt.