Card Spread
betaA stack of cards that fans into an arc, row, corner fan, stamp arc, cascade, dealt hand or wheel on hover, focus or click.
- Display
- 2 files
- 2 npm packages
- Accessibility notes
pnpm dlx @dowel-ui/cli add card-spreadnpm packages installed: class-variance-authority, radix-ui.
import { CardSpread } from "@/components/ui/card-spread";Default
Gallery
Stamp Arc
Link Cards
Right To Left
<CardSpread>
| Prop | Type | Default |
|---|---|---|
defaultOpenInitial pinned-open state when uncontrolled. | boolean | false |
edgeCard edge for every item. Defaults to | "rounded" | "stamp" | — |
layoutHow the cards fan out. | CardSpreadLayout | "arc" |
onOpenChangeCalled when the toggle (click, tap, Enter, Space or Escape) pins or unpins the spread. | (open: boolean) => void | — |
openControlled pinned-open state. Hover and focus still open it transiently. | boolean | — |
size | "sm" | "md" | "lg" | "md" |
staggerMilliseconds between one card starting to move and the next. Scaled for reduced motion. | number | 30 |
toggleLabelAccessible name of the pin toggle a deck of non-interactive cards gets. | string | "Spread cards" |
triggerWhat opens the spread. - | CardSpreadTrigger | "hover" |
Plus every attribute of <div>.
<CardSpreadItem>
| Prop | Type | Default |
|---|---|---|
edge | "rounded" | "stamp" | "rounded" |
asChildRender the card surface as your own element — an | boolean | — |
Plus every attribute of <div>.
10/10
checks passed
- Tested — passes
- axe assertion — passes
- Keyboard tested — passes
- Storybook examples — passes
- Accessibility documented — passes
- Semantic tokens only — passes
- Motion from tokens — passes
- className merged — passes
- Visible focus — passes
- No fixed widths — passes