Skip to content
caliper ui docs

Pro

Radio cards

Large selectable cards for a choice that needs a title and a description.

Pro
pnpm dlx shadcn@latest add @caliper/radio-cards

Choose a plan

Halden Analytics · 12 people · billed monthly

Installs components/ui/radio-cards.tsxDepends on none beyond ReactMotion none in component source

When to use

Use it for

  • Plans, shipping methods and modes where each option needs explaining.
  • Two to four options.

Skip it when

  • 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.

Usage

Import it from your copy of the source. The example behind the preview comes with the source.

example.tsx
import { RadioCards } from "@/components/ui/radio-cards"

The worked example comes with Pro

The 33-line example behind the preview opens here, ready to copy.

  • 626 Pro parts, blocks and page templates, all with source
  • $149 once, with lifetime updates. No renewal
  • A full refund within 14 days if it is not for you
Checking your licence…

API reference

RadioCards

component
PropTypeDefault
label *string—
options *readonly RadioCardOption[]—
valuestring—
defaultValuestring—
onValueChange((value: string) => void)—
namestring—
classNamestring—

Accessibility

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

KeyBehaviour
→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.

Motion

It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.

All Choice groups examples