Skip to content
OAIT Design System

Design system / Components

Choice card

A large option to tap: a card-shaped <label> around a visible native radio or checkbox, with a title, an optional description, and an optional icon. It is how forms ask a question whose answers people read and compare.

When to use

  • Answers people read and compare before choosing: "What is it about?" on a contact form, "Who can see your details", "Type of person".
  • Scales: a five-point agreement scale ("I enjoy solving complex problems."), in Tamakkan's assessments.
  • Consent: one checkbox card in a group of its own ("I agree to the privacy notice and the use of my details to create and manage my Global ID.") (canonical §10.7).
  • An option on a pastel or a status container, where a bare box's dark outline falls below 3:1: the card's surface-container-lowest carries the box (canonical §2.4).

When not to use

  • Filters and short lists of plain options: checkbox and radio rows.
  • A card that goes somewhere (Jobs' sign-up role cards with a chevron): a link card, never a choice card (D-CAI-15).
  • A mode of the same content: a segmented button.
  • A setting that applies at once: a switch.
  • A long or familiar list: a select.

Anatomy

  1. Card (<label class="oa-choice">): at least 56px tall, 12px block and 16px inline padding, 16px between parts, rounded-box (16px), a 1px --color-outline-variant hairline, surface-container-lowest.
  2. Indicator: the native radio or checkbox at the inline start, a 20px box on the title's first line.
  3. Icon (optional): 24px on-surface-variant after the indicator, centered on the first line.
  4. Title: text-title-sm; it wraps.
  5. Description (optional): text-body-md in on-surface-variant.

Group: a <fieldset> with a <legend> (text-label-md), the hint or error right under the legend, then the cards 8px apart (.oa-choice-group). Radios give one answer, checkboxes several.

The hairline is enough of an edge because the visible indicator identifies the control (canonical §2.4, V-2).

Variants

Variant Use for Key tokens
Radio cards one answer from a few, each worth reading --color-outline-variant, --color-surface-container-lowest, --radius-box
Checkbox cards several answers the same
With an icon options that a symbol helps tell apart ("Everyone at GU", "Only me") --size-icon-lg, --color-on-surface-variant
Grid (--grid) short parallel options, up to three columns from 640px (sm) --oa-choice-columns (3 by default)
Likert scale (--likert) a five-point agreement scale, five equal columns from 1024px (lg) —
Consent one checkbox card alone in its group —

Sizes

Size Height Padding Type style Icon size
Card (the only size) at least 56px (min-h-14) 12px block, 16px inline (py-3 px-4); 16px between parts (gap-4) title text-title-sm; description text-body-md indicator 20px; icon 24px (--size-icon-lg)
Group — 8px between cards (gap-2) legend text-label-md, 6px above the cards —

Tokens

Part Property Token
Card fill, edge, radius --color-surface-container-lowest, 1px --color-outline-variant, --radius-box
Card text --color-on-surface; title --text-title-sm
Description type, color --text-body-md, --color-on-surface-variant (also when selected)
Icon color, size --color-on-surface-variant, --size-icon-lg
State layer hover, pressed currentColor at --opacity-state-hover and --opacity-state-pressed
Selected fill, edge, text --color-primary-container; 1px --color-primary-ink border plus a 1px inset line of it; title and icon --color-on-primary-container
Focus ring on the card --size-focus-ring, --size-focus-offset, --color-focus-ring
Disabled edge, content --color-on-surface at --opacity-state-disabled-container and --opacity-state-disabled-content
Motion colors --duration-short-3, --ease-standard

States

State Card Indicator How
Enabled hairline, surface-container-lowest 2px outline edge —
Hover the 8% layer of the card's text color — :hover, on devices that hover
Pressed the 12% layer, at once — :active
Focus the ring on the card, 2px outside, following its 16px radius its own ring hidden :has(:focus-visible) (D-CAI-15)
Selected primary-container, a 2px primary-ink edge that does not shift; title and icon on-primary-container, the icon filled checked :has(:checked); the edge and the indicator carry the state as well as the fill (D-CAI-14, D-ARC-32)
Error unchanged unchanged the message under the legend; aria-invalid and aria-describedby on the inputs
Disabled edge at 12% of on-surface, content at 38%, no layer 38% the disabled attribute, or a disabled fieldset

The description keeps on-surface-variant on the selected fill: 7.21:1 in light and 6.89:1 in dark.

Behavior

  • The whole card is the target: a press anywhere selects it.
  • Radios: arrow keys move and select within the group (reversed in Arabic) and Tab enters at the checked card; checkboxes toggle with Space (canonical §13).
  • Layout: cards stack 8px apart. A grid of up to three columns from 640px (sm) for short parallel options; a Likert scale in five equal columns from 1024px (lg), stacked below. Canonical §10.7 names the medium and expanded window classes, which start at sm and lg in the family's breakpoints (D-LAY-02). They follow the window, so use them where the group spans the content column; inside a narrow form card (max-w-form, 460px) keep the cards stacked (canonical §4.2).
  • Validation follows the text field: checked on submit, the message under the legend ("Choose what your message is about."), focus on the first invalid input, never a live region.
  • Colors change over duration-short-3 with ease-standard; a press shows at once; nothing moves or lifts.
  • Forced colors: a selected card adds a 2px Highlight outline inside its edge, except while the focus ring shows.

Accessibility

  • A visible native input inside the <label>: the card's text names it, and the keyboard and form value are the browser's. Tamakkan's answer and Likert buttons, which have no checked state today, gain real radio semantics (TK-1.04).
  • The group is a <fieldset> with a <legend>; the hint or the error is tied to every input with aria-describedby.
  • The selected state never rests on the fill alone: the native indicator and the 2px edge carry it (D-CAI-14).
  • Contrast: the indicator's outline is 3:1 or more on surface-container-lowest and on primary-container (canonical §2.4); the --color-outline-variant hairline is decorative, which is allowed because the indicator identifies the control (V-2).
  • The ring draws on the whole card, so the focused target is plain to see.
  • Targets: the card, at least 56px tall.

RTL and languages

  • The indicator and the icon sit at the inline start (the right in Arabic); grids and Likert scales fill from the inline start, so "Strongly disagree" stays first in reading order.
  • Icons in choice cards are not directional and never mirror (canonical §8.3).
  • Arabic titles use the taller line (1.75); the indicator and the icon center on the first line in both scripts.
  • Budget 32% more length for French titles (D-TYP-15); in a three-column grid keep the titles short, and check the stacked layout at 360px.

Content

  • Legend: the question, as a noun phrase or a question: "What is it about?", "Who can see your details", "Type of person" / "نوع الشخص" / "Type de personne".
  • Titles: short, parallel, in sentence case without a full stop; first person where the person speaks: "I can’t sign in", "Employer account", "Privacy request"; "Only me".
  • Descriptions: what the option means, as a phrase without a full stop ("Teaching or research appointment" / "تعيين تدريسي أو بحثي" / "Poste d’enseignement ou de recherche") or as a full sentence with one ("You forgot your password, or your account is locked.") (canonical §12.2).
  • Likert labels: "Strongly disagree", "Disagree", "Neutral", "Agree", "Strongly agree"; the statement is the legend.
  • Consent: one sentence that says what the person agrees to, ending with a full stop; the notice is one link away, outside the card, so following it never ticks the box ("Read the privacy notice").
  • Errors start with the verb: "Choose what your message is about."

Do and don't

Do Don't
Keep the native radio or checkbox visible at the inline start. Hide the input and draw a dot at the end.
Show the selected card with the fill and the 2px primary-ink edge drawn inside. Thicken the border so the content shifts.
Use a grid only for short, parallel options. Put long descriptions in three narrow columns.
Make a card that navigates a link card. Put a chevron on a choice card.
Put a consent box in a group of its own. Hide consent inside another question's cards.

Code

HTML (reference CSS)

Radio cards with an error (Global Jobs contact form):

<fieldset class="oa-fieldset">
  <legend class="oa-fieldset__legend" id="cc-topic-legend">What is it about?</legend>
  <p class="oa-fieldset__error" id="cc-topic-error"><span class="oa-icon oa-icon--filled" aria-hidden="true" translate="no">error</span>Choose what your message is about.</p>
  <div class="oa-choice-group">
    <label class="oa-choice">
      <input class="oa-choice__indicator" name="cc-topic" type="radio" value="sign-in" aria-invalid="true" aria-describedby="cc-topic-error">
      <span class="oa-choice__content">
        <span class="oa-choice__title">I can’t sign in</span>
        <span class="oa-choice__desc">You forgot your password, or your account is locked.</span>
      </span>
    </label>
    <label class="oa-choice">
      <input class="oa-choice__indicator" name="cc-topic" type="radio" value="employer" aria-invalid="true" aria-describedby="cc-topic-error">
      <span class="oa-choice__content">
        <span class="oa-choice__title">Employer account</span>
        <span class="oa-choice__desc">Open an employer account, or get help with yours.</span>
      </span>
    </label>
    <label class="oa-choice">
      <input class="oa-choice__indicator" name="cc-topic" type="radio" value="privacy" aria-invalid="true" aria-describedby="cc-topic-error">
      <span class="oa-choice__content">
        <span class="oa-choice__title">Privacy request</span>
        <span class="oa-choice__desc">See, correct or delete the information we hold about you.</span>
      </span>
    </label>
  </div>
</fieldset>

Selected, with icons (Global ID's directory visibility):

<fieldset class="oa-fieldset">
  <legend class="oa-fieldset__legend">Who can see your details</legend>
  <p class="oa-fieldset__hint" id="cc-visibility-hint">Choose who can find you in the university directory.</p>
  <div class="oa-choice-group">
    <label class="oa-choice">
      <input class="oa-choice__indicator" name="cc-visibility" type="radio" value="everyone" aria-describedby="cc-visibility-hint">
      <span class="oa-icon oa-choice__icon" aria-hidden="true" translate="no">groups</span>
      <span class="oa-choice__content">
        <span class="oa-choice__title">Everyone at GU</span>
        <span class="oa-choice__desc">Classmates, staff and faculty can find you in the directory</span>
      </span>
    </label>
    <label class="oa-choice">
      <input class="oa-choice__indicator" name="cc-visibility" type="radio" value="unit" checked aria-describedby="cc-visibility-hint">
      <span class="oa-icon oa-choice__icon" aria-hidden="true" translate="no">school</span>
      <span class="oa-choice__content">
        <span class="oa-choice__title">Only my organization unit</span>
        <span class="oa-choice__desc">Only people in the Faculty of Engineering</span>
      </span>
    </label>
    <label class="oa-choice">
      <input class="oa-choice__indicator" name="cc-visibility" type="radio" value="only-me" aria-describedby="cc-visibility-hint">
      <span class="oa-icon oa-choice__icon" aria-hidden="true" translate="no">lock</span>
      <span class="oa-choice__content">
        <span class="oa-choice__title">Only me</span>
        <span class="oa-choice__desc">University offices can still see what they need</span>
      </span>
    </label>
  </div>
</fieldset>

A grid of short options (Global ID's "Add person"):

<fieldset class="oa-fieldset">
  <legend class="oa-fieldset__legend">Type of person</legend>
  <div class="oa-choice-group oa-choice-group--grid">
    <label class="oa-choice">
      <input class="oa-choice__indicator" name="cc-type" type="radio" value="faculty">
      <span class="oa-choice__content">
        <span class="oa-choice__title">Faculty</span>
        <span class="oa-choice__desc">Teaching or research appointment</span>
      </span>
    </label>
    <label class="oa-choice">
      <input class="oa-choice__indicator" name="cc-type" type="radio" value="staff" checked>
      <span class="oa-choice__content">
        <span class="oa-choice__title">Staff</span>
        <span class="oa-choice__desc">Administrative or support role</span>
      </span>
    </label>
    <label class="oa-choice">
      <input class="oa-choice__indicator" name="cc-type" type="radio" value="guest">
      <span class="oa-choice__content">
        <span class="oa-choice__title">Guest</span>
        <span class="oa-choice__desc">Visitor with time-limited access</span>
      </span>
    </label>
  </div>
</fieldset>

A Likert scale:

<fieldset class="oa-fieldset">
  <legend class="oa-fieldset__legend">I enjoy solving complex problems.</legend>
  <div class="oa-choice-group oa-choice-group--likert">
    <label class="oa-choice">
      <input class="oa-choice__indicator" name="cc-likert" type="radio" value="1">
      <span class="oa-choice__content"><span class="oa-choice__title">Strongly disagree</span></span>
    </label>
    <label class="oa-choice">
      <input class="oa-choice__indicator" name="cc-likert" type="radio" value="2">
      <span class="oa-choice__content"><span class="oa-choice__title">Disagree</span></span>
    </label>
    <label class="oa-choice">
      <input class="oa-choice__indicator" name="cc-likert" type="radio" value="3">
      <span class="oa-choice__content"><span class="oa-choice__title">Neutral</span></span>
    </label>
    <label class="oa-choice">
      <input class="oa-choice__indicator" name="cc-likert" type="radio" value="4" checked>
      <span class="oa-choice__content"><span class="oa-choice__title">Agree</span></span>
    </label>
    <label class="oa-choice">
      <input class="oa-choice__indicator" name="cc-likert" type="radio" value="5">
      <span class="oa-choice__content"><span class="oa-choice__title">Strongly agree</span></span>
    </label>
  </div>
</fieldset>

Consent, and a disabled group:

<fieldset class="oa-fieldset">
  <legend class="oa-fieldset__legend">Check and agree</legend>
  <div class="oa-choice-group">
    <label class="oa-choice">
      <input class="oa-choice__indicator" name="cc-consent" type="checkbox" required>
      <span class="oa-choice__content">
        <span class="oa-choice__title">I agree to the privacy notice and the use of my details to create and manage my Global ID.</span>
      </span>
    </label>
  </div>
</fieldset>
<fieldset class="oa-fieldset" disabled>
  <legend class="oa-fieldset__legend">Type of person</legend>
  <div class="oa-choice-group">
    <label class="oa-choice">
      <input class="oa-choice__indicator" name="cc-type-disabled" type="radio" value="alumni">
      <span class="oa-choice__content">
        <span class="oa-choice__title">Alumni</span>
        <span class="oa-choice__desc">Graduate keeping lifelong access</span>
      </span>
    </label>
  </div>
</fieldset>

Arabic:

<div dir="rtl" lang="ar">
  <fieldset class="oa-fieldset">
    <legend class="oa-fieldset__legend">نوع الشخص</legend>
    <div class="oa-choice-group oa-choice-group--grid">
      <label class="oa-choice">
        <input class="oa-choice__indicator" name="cc-type-ar" type="radio" value="faculty" checked>
        <span class="oa-choice__content">
          <span class="oa-choice__title">عضو هيئة التدريس</span>
          <span class="oa-choice__desc">تعيين تدريسي أو بحثي</span>
        </span>
      </label>
      <label class="oa-choice">
        <input class="oa-choice__indicator" name="cc-type-ar" type="radio" value="staff">
        <span class="oa-choice__content">
          <span class="oa-choice__title">موظف</span>
          <span class="oa-choice__desc">وظيفة إدارية أو داعمة</span>
        </span>
      </label>
      <label class="oa-choice">
        <input class="oa-choice__indicator" name="cc-type-ar" type="radio" value="guest">
        <span class="oa-choice__content">
          <span class="oa-choice__title">ضيف</span>
          <span class="oa-choice__desc">زائر بوصول محدّد المدة</span>
        </span>
      </label>
    </div>
  </fieldset>
</div>

Tailwind CSS v4

<fieldset class="flex flex-col">
  <legend class="mb-1.5 text-label-md text-on-surface">What is it about?</legend>
  <div class="flex flex-col gap-2">
    <label class="relative isolate flex min-h-14 cursor-pointer items-start gap-4 rounded-box border border-outline-variant bg-surface-container-lowest px-4 py-3 text-body-lg text-on-surface transition-colors duration-short-3 ease-standard before:pointer-events-none before:absolute before:-inset-px before:-z-1 before:rounded-[inherit] before:bg-current before:opacity-0 before:transition-opacity before:duration-short-3 before:ease-standard before:content-[''] hover:before:opacity-(--opacity-state-hover) active:before:opacity-(--opacity-state-pressed) active:before:duration-0 has-checked:border-primary-ink has-checked:bg-primary-container has-checked:text-on-primary-container has-checked:shadow-[inset_0_0_0_1px_var(--color-primary-ink)] has-focus-visible:outline-3 has-focus-visible:outline-offset-2 has-focus-visible:outline-focus-ring forced-colors:has-checked:not-has-focus-visible:outline-2 forced-colors:has-checked:not-has-focus-visible:-outline-offset-3 forced-colors:has-checked:not-has-focus-visible:outline-[Highlight] has-disabled:cursor-default has-disabled:border-on-surface/12 has-disabled:shadow-none has-disabled:before:opacity-0 has-disabled:**:text-on-surface/38">
      <input type="radio" name="topic" value="sign-in" class="mt-[calc((1lh-1.25rem)/2)] size-5 shrink-0 accent-primary-ink focus-visible:outline-transparent">
      <span class="flex min-w-0 flex-1 flex-col">
        <span class="text-title-sm">I can’t sign in</span>
        <span class="text-body-md text-on-surface-variant">You forgot your password, or your account is locked.</span>
      </span>
    </label>
  </div>
</fieldset>
  • Icon: after the input, <span class="flex h-[1lh] shrink-0 items-center text-on-surface-variant [label:has(:checked)_&]:text-on-primary-container" aria-hidden="true"><span class="oa-icon [label:has(:checked)_&]:[font-variation-settings:'FILL'_1]" translate="no">groups</span></span>; the wrapper is one line of the card's text tall, so the icon centers on the first line in both scripts.
  • Grid: the cards' wrapper becomes flex flex-col gap-2 sm:grid sm:grid-cols-3 (or sm:grid-cols-2).
  • Likert scale: flex flex-col gap-2 lg:grid lg:grid-cols-5.
  • Checkbox cards: the same card with type="checkbox".

React

<ChoiceGroup legend={t('contact.topic.legend')} error={errors.topic}>
  <ChoiceCard type="radio" name="topic" value="sign-in" title={t('contact.topic.signIn')} description={t('contact.topic.signInBody')} />
  <ChoiceCard type="radio" name="topic" value="employer" title={t('contact.topic.employer')} description={t('contact.topic.employerBody')} />
</ChoiceGroup>
Prop Type Default Description
legend string required The question (ChoiceGroup).
hint, error string — Under the legend; the error sets aria-invalid on every input (ChoiceGroup).
layout 'stack' | 'grid' | 'likert' 'stack' Stacked cards, up to three columns from sm, or five from lg (ChoiceGroup).
columns 2 | 3 3 Columns of a grid (ChoiceGroup).
type 'radio' | 'checkbox' 'radio' The native input (ChoiceCard).
title ReactNode required The option's title (ChoiceCard).
description ReactNode — One more line (ChoiceCard).
icon string — A Material Symbols name for the 24px icon (ChoiceCard).
name, value string required The form value (ChoiceCard).
checked, defaultChecked, onChange, and the disabled attribute native — Passed to the input (ChoiceCard).