Skip to content
caliper ui pro docs

Card fan

A hand of cards to choose from. They fan out from a point below; the card under the pointer rises and its neighbours lean away; the chosen card is drawn up out of the hand, straight and on top, and the others close ranks.

Pro

Stone card design

When to use

  • Choosing a card design, a theme, a plan tier or an avatar.
  • Three to seven visual options where the choice should feel tactile.

When not to use

  • Options people need to compare in detail side by side; use radio cards.
  • More than about seven cards.

Installation

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

Adds its 2 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

CardFan

5 props

Also accepts the native props of its root element and a ref.

PropTypeDefaultDescription
cards *readonly FanCard[]—
label *string—Names the choice, e.g. "Card design".
valuestring—
defaultValuestring—
onValueChange((id: string) => void)—

Keyboard

  • No custom key handling; Tab and the native activation keys do the work.

Accessibility

It exposes radiogroup and radio semantics, with aria-label and aria-checked kept in step with state.

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-fan.md

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

More in Compare & browse