Skip to content
caliper ui pro docs

Card stack

A pile of cards you flick through one by one.

Pro

Billing pages audit

Five suggestions from Priya Nair to keep or skip

Copy

Rename Save to Save draft

Two reviewers read “Save” as publishing. A clearer label cuts support questions.

1 of 5

When to use

  • Reviewing a short queue, such as suggestions or onboarding tips.
  • Touch-first interfaces.

When not to use

  • Users need to compare items side by side.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/card-stack

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

CardStack

7 props
PropTypeDefault
label *string—
items *readonly StackItem[]—
leftLabelstring"Skip"
rightLabelstring"Keep"
onDecision((item: StackItem, direction: Direction) => void)—
heightstring"18rem"
classNamestring—

Keyboard

←
Moves to the previous item or value.
→
Moves to the next item or value.
Backspace
Removes the previous character or item.

Accessibility

It exposes group and status semantics, with aria-label and aria-hidden kept 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-stack.md

The index of every part is at /llms.txt.

More in Compare & browse