SponsorYour name here · $500/mo

Click a card: each one is a radio button grown into a card; the corner circle shows the pick

Choice Cards (Radio Cards)

/ <input type="radio"> · role="radiogroup" + aria-checked /

also called selection cards, card picker, selectable tiles, radio tiles, checkbox cards (the pick-several kind)

“The options are big boxes and the one you click lights up” is a set of choice cards, also called radio cards (Radix Themes RadioCards, Chakra UI RadioCard): radio buttons where the whole card is the button. Each card has room for a title, a price and a line of details, which is why plan pickers and checkout shipping options use them. Picking one unpicks the others and gives it a colored border and tint; when several can be on at once they are checkbox cards. They are not a toggle group, which is one compact joined bar, nor ordinary cards, which show content rather than set a value.

If you called it…

“the options are big boxes and the one you click gets a colored border”“choose one among multiple cards in an app”“unlike radio buttons the choice itself is a button that changes color when clicked”“the membership plan boxes where you click one to pick your plan”“larger tiles controlling the selection”“pricing boxes with a little circle in the corner that fills in when you pick one”“app中 在多个卡片中选择一个”

…you meant Choice Cards (Radio Cards).

Anatomy — every part, named

  1. 1
    Selected carddata-state="checked"

    “The colored border and soft tint on the card you clicked” is the selected card, the checked state of the one option that is on.

  2. 2
    Selection indicator<RadioCard.ItemIndicator>

    “The little circle in the corner of each card” is the selection indicator, a radio circle that fills on the picked card and shows that only one can be picked.

  3. 3
    Card description<RadioCard.ItemDescription>

    “The small gray line of specs inside each option box” is the card description, the reason to use cards instead of plain radio buttons.

Prompt — paste into your agent

Build choice cards, also called radio cards (Radix Themes RadioCards, Chakra UI RadioCard; natively a <label> wrapping <input type="radio">, styled with :has(:checked)): a role="radiogroup" of bordered cards, each with a title, a short description and a radio circle in the corner. Clicking anywhere on a card selects it and deselects the rest; the selected card gets an accent border and a soft tint, and the arrow keys move the selection. Make the whole card the click target, not just the circle.

Debug prompt — when it misbehaves

Paste this, then describe what you’re seeing — it hands your agent the classic failure modes to rule out first.

Debug my choice cards (role="radiogroup", <input type="radio">, :has(:checked), RadioCards, RadioCard). Rule out: only the small circle being clickable because the card is not the <label> or the radio itself; two cards staying selected because the inputs do not share one name; the arrow keys doing nothing because custom cards lack role="radio", aria-checked and a roving tabindex; Tab stopping on every card instead of once on the group; the selected border making the card jump because it is thicker than the unselected one; no visible keyboard focus because the real input is hidden with display: none; the selected look relying on color alone, with no filled circle or check. The symptom:

In code

The exact names this thing goes by in code — each row is one framework’s word for it. Use the row that matches your project (or paste it into your prompt).

HTML<input type="radio">inside a <label> card, styled with :has(:checked)
ARIArole="radiogroup" + aria-checkedfor custom cards; the arrow keys move the pick
Radix<RadioCards.Root> + <RadioCards.Item>Radix Themes; CheckboxCards picks several
Chakra UI<RadioCard.Root> + <RadioCard.Item>with ItemIndicator and ItemDescription inside
Mantine<Radio.Card>turns a whole container into one radio option

See also

From the maker of this site48h Icons · Custom Apple app icons in 48 hours