Radio cards
Large selectable cards for a choice that needs a title and a description.
Grid
List
When to use
- Plans, shipping methods and modes where each option needs explaining.
- Two to four options.
When not to use
- Options are one word each; use a segmented control.
- Several can be chosen; use checkboxes or chips.
Installation
terminal
pnpm dlx shadcn@latest add @caliper/radio-cards
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
RadioCards
8 props
PropTypeDefaultDescription
label *string—
layout"grid" | "list""grid"Cards in columns, or one row per option with the price at the end.
options *readonly RadioCardOption[]—
valuestring—
defaultValuestring—
onValueChange((value: string) => void)—
namestring—
classNamestring—
Keyboard
- →
- Moves to the next item or value.
- ↓
- Moves to the next item or value.
- ←
- Moves to the previous item or value.
- ↑
- Moves to the previous item or value.
Accessibility
It exposes radiogroup and radio semantics, with aria-label, aria-hidden, aria-checked and aria-disabled 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/radio-cards.mdThe index of every part is at /llms.txt.