Selection

Choice card

A selectable card around a radio or checkbox. Selection is the one state that earns a ring.

Examples

Plans

Anatomy

label.choiceThe card: a filled row that is the label for its input.
> input[type=radio]A radio or checkbox, drawn as usual at the start of the card.
> spanThe text column.
span > bThe option's title.
span > smallOptional detail line, muted.

API

AttributeValuesDescription
checkedbooleanOn the input: tints the card with the accent and draws a 1.5px accent ring.

Accessibility

  • The whole card is the label, so its name is the title plus the detail line. Keep the detail short.
  • Group the cards in a <fieldset> with a <legend> (or role="radiogroup" with an aria-label) so the question is read with the options.
  • Keyboard focus replaces the selection ring with the focus ring while the card has focus.
KeyEffect
↑ / ↓ / ← / →With radios: moves the selection between cards.
SpaceWith checkboxes: toggles the focused card.
Jump to
ProportionFoundations
MaterialFoundations
PresetsFoundations
ShellLayouts · Application
Container and stacksLayouts · Pages
SplitLayouts · Pages
Grid, bento, masonryLayouts · Pages
Switcher and rowLayouts · Pages
↑↓Move↵OpenescClose