Skip to contentKino
Skip to Content

Radio cards

Pick one of a few options, each a card. The tint spreads from where you pressed, as the old pick’s drains away.

npx shadcn add https://kinoui.com/r/radio-cards.json
Share on

Examples

Plan

Billed monthly. Change it any time; we prorate the difference.
14 seats · $168 / month

Default

Each card is the radio, so a press anywhere on it picks it. The tint spreads from where you pressed until it fills the card, while the old pick’s drains away.

Delivery

Order KN-20418 · 2 items
Total $146.00

Rows

Set className="grid-cols-1" for one card per row, and lay a card out in a row with an icon at its start.

Create a workspace

Where your data lives can’t be changed later.

Data region

Pick a region to create the workspace.

Invalid

Set aria-invalid on each card once the person tries to go on without a pick, and point the group’s aria-describedby at the reason.

Billing

Kino · 14 seats on the Team plan

Disabled

disabled on one card turns off only that option; say why on the card. disabled on the group turns off every card.

Installation

npx shadcn@latest add https://kinoui.com/r/radio-cards.json
Files
lib/reduce-motion.tslib/resize.tslib/choice.tscomponents/kino/radio-group.tsxcomponents/kino/radio-cards.tsx
Packages
@base-ui/react

New to Kino? Installation covers what your project needs first and the @kino namespace.

API reference

RadioCards

PropTypeDefaultDescription
valuestringNoneThe picked value, when you hold the state.
defaultValuestringNoneThe value picked at first, when it holds its own state.
onValueChange(value, details) => voidNoneCalled with the new value when another card is picked.
disabledbooleanfalseTurns off every card.
requiredbooleanfalseThe form can’t be sent until a card is picked.
namestringNoneThe field’s name when the group is in a <form>.

RadioCard

PropTypeDefaultDescription
valuestringNoneThe value the group takes when this card is picked.
disabledbooleanfalseTurns off this card only.
aria-invalidbooleanNoneDraws its border in the destructive colour, with a ring.

Data attributes

AttributeOnDescription
data-checkedRadioCardPresent while it is picked.
data-disabledRadioCard, RadioCardsPresent while it is disabled.

Accessibility

  • It follows the radio group pattern: Tab moves into the group at the picked card, and the arrow keys move the pick.
  • Each card is read out by its RadioCardTitle, then its RadioCardDescription. Name the group with aria-label, or with aria-labelledby pointing at its visible heading.
  • The picked card shows its radio’s filled disc and a primary border, so the pick never relies on the tint. In forced colours the border and the disc take the system highlight.
  • When the system asks for less motion, the tint fades in place and the disc appears at once.