StartFoundationsComponentsContent

Selection card

A selection card is a larger option with room for a description, an icon, or a price. The whole card is the click target; the tk-radio or tk-checkbox inside it does the selecting.

Stable Figma
OverviewUsageAPIAccessibility
Starter $9/mo Pro $29/mo
<tk-radio-group label="Choose your plan" name="plan" value="starter">
  <tk-selection-card>
    <tk-icon slot="media" name="user"></tk-icon>
    <tk-radio slot="control" value="starter" helper="For one person, $9 a month">Starter</tk-radio>
    <span slot="meta">$9/mo</span>
  </tk-selection-card>
  <tk-selection-card>
    <tk-icon slot="media" name="star"></tk-icon>
    <tk-radio slot="control" value="pro" helper="For growing teams, $29 a month">Pro</tk-radio>
    <span slot="meta">$29/mo</span>
  </tk-selection-card>
</tk-radio-group>

Anatomy

Part What it is
tk-selection-card the bordered card; the whole card is one click target
control slot a tk-radio or tk-checkbox, required. Its label is the card title and the accessible name; its helper is the description
media slot an optional icon or image before the title; screen readers skip it
meta slot an optional price or badge after the title; screen readers skip it

The control you put in decides the mode: a circle means pick one, a square means pick any. Don't mix the two in one group.

Checkbox cards

Analytics Backups
<tk-checkbox-group label="Add features">
  <tk-selection-card>
    <tk-checkbox slot="control" name="features" value="analytics" helper="Dashboards and exports">Analytics</tk-checkbox>
  </tk-selection-card>
  <tk-selection-card>
    <tk-checkbox slot="control" name="features" value="backups" helper="Daily, kept for 30 days" checked>Backups</tk-checkbox>
  </tk-selection-card>
</tk-checkbox-group>

Each checkbox card is its own Tab stop and submits its checkbox's name and value. Radio cards share the group's one Tab stop and its value.

Control position

control-position="trailing" puts the control at the end, after the title. The default, leading, puts it first. media always comes first and meta always last.

Standard Express
<tk-radio-group label="Shipping" name="shipping" value="standard">
  <tk-selection-card control-position="trailing">
    <tk-radio slot="control" value="standard" helper="3 to 5 business days">Standard</tk-radio>
  </tk-selection-card>
  <tk-selection-card control-position="trailing">
    <tk-radio slot="control" value="express" helper="Next business day">Express</tk-radio>
  </tk-selection-card>
</tk-radio-group>

States

Personal Business
<tk-radio-group label="Account type" name="account" value="personal">
  <tk-selection-card>
    <tk-radio slot="control" value="personal">Personal</tk-radio>
  </tk-selection-card>
  <tk-selection-card disabled>
    <tk-radio slot="control" value="business" helper="Not available in your region">Business</tk-radio>
  </tk-selection-card>
</tk-radio-group>

On hover, the border gets stronger and the card tints. Keyboard focus on the control shows one ring around the whole card.

  • Selected: a stronger border and a tint, plus the control's own check or dot. Set it on the control (checked) or the group (value), never on the card.
  • disabled: disables the control and dims the card. A disabled group dims its cards too. Say why in the description, or leave the option out.
  • Error and required: set them on the group. The message shows above the cards, and the cards don't change color.