Skip to content
OAIT Design System

Design system / Components

Checkbox, radio, and switch

Native checkboxes and radios in 48px label rows for answers in a form, and the switch for one setting that applies the moment it is pressed.

When to use

  • Checkbox: options that are independent, where any number may apply (the "Work type" filters, "Also share my mobile number"); or one box the person ticks to confirm something ("I checked Karim Nassar’s ID in person").
  • Radio: exactly one of a few options shown together ("Date posted": Any time, Last 24 hours, Last 7 days, Last 30 days).
  • Switch: one setting that takes effect at once and can be turned back ("Email me when someone signs in on a new device"); the page confirms the change in a snackbar with Undo.

When not to use

  • Options with a title and a description, a scale, or a consent box: choice cards, which wrap the same native inputs (canonical §10.7).
  • Filters in a compact row above results: filter chips.
  • A long or familiar list: a select.
  • A mode of the same content (card side, scan direction): a segmented button (canonical §10.8).
  • A setting inside a form that is submitted later: a checkbox, never a switch; a switch applies at once (canonical §10.6).
  • An action or a link: a button or a link. A checkbox never navigates.

Anatomy

Checkbox and radio row

  1. Row (<label class="oa-check">): at least 48px tall, 12px block and 8px inline padding, an 8px shape for the state layer of on-surface.
  2. Box: the native <input type="checkbox"> or <input type="radio">, a 20px box (a 20px ring for a radio), on the first line of the label.
  3. Label: text-body-lg in on-surface; it wraps.
  4. Hint (optional): text-body-md in on-surface-variant, under the label.
  5. Count (optional): tabular text-body-md in on-surface-variant at the inline end, on the label's baseline.

Group: a <fieldset> with a <legend> in the field-label style (text-label-md, 6px above the first row); the group's hint or error sits right under the legend; rows stack with no gap (D-CAI-12).

Switch

  1. Setting row (.oa-switch-field): at least 48px tall with 12px block padding, like a checkbox row, so stacked rows stay apart; the setting's name in text-title-sm and an optional hint in text-body-md at the inline start; the switch at the inline end, 16px away.
  2. Hit area: <button type="button" role="switch">, 64 × 48px, a pill with the state layer of on-surface.
  3. Track: 52 × 32px with a 2px border.
  4. Thumb: 16px near the inline start when off; 24px at the inline end when on.
  5. Check: a 16px check in the thumb, shown only when on, so the state never rests on color alone (D-CAI-14).

Two drawings, one control. The element is always the native input, with its semantics, keyboard, form value, and indeterminate state. Tailwind and React products let the browser draw it, 20 × 20px with accent-color: var(--color-primary-ink) (D-CAI-12). The reference CSS (selection.css) draws the same thing itself with appearance: none: canonical §10.5's drawn box, a 2px outline edge, a 4px radius, a primary-ink fill with a surface tick. The input's own box is then 24px with the drawing 2px inside it, so the input alone meets the 24px minimum and looks the same in every browser; the 48px row is the full target in both. shadcn products draw the Radix checkbox with the same geometry (see the Tailwind recipe below).

Variants

Variant Use for Key tokens
Checkbox independent options, filters, one confirmation --color-primary-ink (fill), --color-surface (tick), --color-outline (edge)
Checkbox with a count filter options with their number of results --color-on-surface-variant, tabular figures
Checkbox with a hint an option that needs one more line ("+961 71 214 723") --text-body-md, --color-on-surface-variant
Select all (indeterminate) the header box of a selectable table or list the checked fill with a 2px bar in place of the tick
Radio one of a few options --color-primary-ink (ring and 10px dot), --color-outline (ring at rest)
Switch a setting that applies at once --color-primary-ink (track on), --color-surface-container-lowest (thumb on), --color-surface-container-highest and --color-outline (off)

Sizes

Size Height Padding Type style Icon size
Checkbox and radio row at least 48px (--size-touch-target, min-h-12) 12px block, 8px inline (py-3 px-2); 12px from box to label (gap-3) label text-body-lg; hint and count text-body-md box 20px (D-ARC-35); radio dot 10px
Switch hit area 64 × 48px; track 52 × 32px; the setting row at least 48px the thumb sits 8px (off) or 4px (on) from the track's outer edge; the setting row 12px block (py-3) and 16px to the switch (gap-4) name text-title-sm; hint text-body-md thumb 16 or 24px; check 16px (--size-icon-xs)

These are component constants from canonical §10.5 and §10.6. The 48px row and the 64 × 48px switch are the targets (canonical §4.6).

Tokens

Part Property Token
Row type, color --text-body-lg, --color-on-surface
Row shape of the state layer --radius-8px (rounded-8px)
Row and switch state layer currentColor at --opacity-state-hover (8%) and --opacity-state-pressed (12%)
Box edge at rest 2px --color-outline
Box checked fill, tick --color-primary-ink (accent-primary-ink); --color-surface
Box radius --radius-4px; --radius-full for the radio
Hint, count type, color --text-body-md, --color-on-surface-variant; counts tabular-nums
Legend type, color --text-label-md, --color-on-surface
Switch track off --color-surface-container-highest with a 2px --color-outline border
Switch track on --color-primary-ink with a transparent 2px border
Switch thumb off, on --color-outline (16px); --color-surface-container-lowest (24px)
Switch check color --color-primary-ink
Disabled parts --color-on-surface at --opacity-state-disabled-container (12%: the switch track) and --opacity-state-disabled-content (38%: edges, fills, the off thumb, the check, text)
Focus ring --size-focus-ring solid --color-focus-ring, 2px outside the 20px box or the switch's pill
Motion thumb; colors --duration-short-4 with --ease-standard for the thumb's position, size, and color; --duration-short-3 for the track, the check, and the layer

States

Checkbox and radio

State Box Row How
Unchecked 2px outline edge, no fill — —
Hover — the 8% layer of on-surface :hover, on devices that hover
Pressed — the 12% layer, at once :active
Focus the ring 2px outside the 20px box — :focus-visible on the input
Checked checkbox: primary-ink fill with a surface tick; radio: primary-ink ring with a 10px dot — the checked attribute or property
Indeterminate primary-ink fill with a 2px bar — input.indeterminate = true (script only)
Error unchanged unchanged; the group's message carries the error aria-invalid and aria-describedby on the inputs, the message under the legend
Disabled edges and fill at 38% of on-surface text at 38%, no layer the disabled attribute, or a disabled fieldset

Switch

State Track Thumb How
Off surface-container-highest, 2px outline border 16px outline, 8px from the inline start <button role="switch" aria-checked="false">
On primary-ink, transparent border 24px surface-container-lowest at the inline end, with a primary-ink check <button role="switch" aria-checked="true">
Hover, pressed — — the 8% and 12% layer of on-surface on the 64 × 48px pill
Focus — — the ring around the pill, 2px outside
Disabled 12% of on-surface; the on track keeps its transparent border off: 38% of on-surface; on: surface-container-lowest with the check at 38% the disabled attribute; the parts take the mixes, never opacity on the whole switch (D-ARC-33)

Behavior

  • Keyboard: Space toggles a checkbox. Arrow keys move and select within a radio group, reversed in Arabic, and Tab enters the group at the checked radio. Space and Enter toggle a switch (canonical §13).
  • Whole row: the label wraps the input, so a press anywhere on the row toggles it.
  • Filters apply at once: on a listing, a filter checkbox updates the results and their count; the page announces the count in its status region ("15 jobs match these filters.") and keeps the filters in the URL (canonical §11 template 4).
  • Select all: the header box is checked when every row is selected, indeterminate when some are, and unchecked when none are; script sets input.indeterminate, and the bulk bar shows the count (table).
  • Switch: it applies at once, and the page confirms in a snackbar with Undo ("We’ll email you about new devices." · "Undo"). If saving fails, the switch returns to its last state and the snackbar says so (Global ID's alerts).
  • Thumb motion: the thumb slides, grows, and changes color over duration-short-4 with ease-standard; under reduced motion it jumps (C-10). The track's colors and the check fade over duration-short-3; a press shows at once.
  • Validation: errors appear on submit, under the legend for a group or a single box, and the first invalid input takes focus; never a live region (canonical §10.4).
  • Forced colors: the drawn box keeps its edge; a checked box and an on switch take the system highlight colors (D-SEM-10).

Accessibility

  • Native inputs inside their <label>; a group is a <fieldset> with a <legend>. The switch is a <button type="button" role="switch" aria-checked> named by its visible setting name (aria-labelledby) and described by its hint (aria-describedby); it uses aria-label only when no visible name exists (D-CAI-13). The aria-checked attribute carries the state, so the name stays the same in both states.
  • The state never rests on color alone: the tick, the dot, the bar, and the switch's check carry it (D-CAI-14).
  • Contrast: the outline edge is 3:1 or more on every surface and on primary-container (canonical §2.4). The primary-ink track is 6.79:1 against the light page and 10.85:1 in dark, and the thumb 7.13:1 and 11.28:1 on the track (D-ARC-11); the surface tick on the primary-ink fill is the same pair as the track against the page, 6.79:1 and 10.85:1.
  • Never place a box straight on a pastel or a status container, where the dark outline falls to 2.93–2.97:1; put the option on a choice card instead (canonical §2.4, V-1).
  • Targets: the 48px row and the 64 × 48px switch; the input's own box is 24px in the reference CSS.
  • Errors: aria-invalid on the inputs and aria-describedby pointing at the group's message.
  • Counts carry their noun for screen readers in visually hidden text ("12 jobs"), so the row reads "Full-time, 12 jobs", the way a count badge's number is part of its control's name (D-CSN-33).
  • Reduced motion: the thumb jumps; nothing else moves.

RTL and languages

  • The box sits at the inline start (the right in Arabic) and the count at the inline end (the left). A switch's on position is the inline end, so the thumb slides to the left in Arabic (canonical §10.6).
  • The check glyph is never mirrored (canonical §8.3).
  • Labels wrap and are never truncated; Arabic lines are taller (text-body-lg at 1.75), and the box centers on the first line in both scripts.
  • Phone numbers and email addresses inside hints sit in <bdi dir="ltr">.
  • The hidden count nouns follow each language's plural rules (ICU plurals); the Arabic " وظيفة" in the example needs native review.
  • Budget 32% more length for French labels and check the rows and setting names at 360px (D-TYP-15).

Content

  • Labels: short, in sentence case, no full stop; a full sentence such as a consent ends with one. Options that act for the person speak as the person: "Also share my mobile number" (canonical §12.1).
  • Legends: a noun phrase or a question: "Work type", "Date posted", "Recovery link".
  • Switch names say what happens while the switch is on: "Email me when someone signs in on a new device" / "راسلني بالبريد عندما يسجّل أحد الدخول من جهاز جديد" / "M’envoyer un e-mail quand quelqu’un se connecte sur un nouvel appareil".
  • Switch confirmations: "We’ll email you about new devices." / "سنراسلك بالبريد عن الأجهزة الجديدة." / "Nous vous enverrons un e-mail pour chaque nouvel appareil."; off: "New-device emails are off." / "توقفت رسائل البريد عن الأجهزة الجديدة." / "Les e-mails sur les nouveaux appareils sont désactivés."; with "Undo" / "تراجع" / "Défaire" (native review) (canonical §12.3).
  • Errors start with the verb: "Tick the box once you have checked their ID in person."
  • Filter options keep the product's words: "Full-time", "Part-time", "Contract", "Volunteer" / "دوام كامل"، "دوام جزئي"، "عقد"، "تطوّع".

Do and don't

Do Don't
Put each input inside its 48px label row. Leave the 20px box as the only target.
Fill a checked box with primary-ink. Fill it with the orange primary: a white tick on it is 2.76:1.
Use a switch for a setting that applies at once, and confirm it with Undo. Put a switch in a form with a "Save" button.
Name a switch by its visible setting name. Give it an aria-label that differs from the words on screen.
Group options in a fieldset and put the error under the legend. Color the boxes red to show an error.
Disable a switch with the disabled mixes on its parts. Dim the whole control with opacity.

Code

HTML (reference CSS)

A filter group with counts (Global Jobs), and radios:

<fieldset class="oa-fieldset">
  <legend class="oa-fieldset__legend">Work type</legend>
  <label class="oa-check">
    <input class="oa-check__input" name="crs-type" type="checkbox" value="full-time" checked>
    <span class="oa-check__label">Full-time</span>
    <span class="oa-check__count">12<span class="oa-visually-hidden"> jobs</span></span>
  </label>
  <label class="oa-check">
    <input class="oa-check__input" name="crs-type" type="checkbox" value="part-time">
    <span class="oa-check__label">Part-time</span>
    <span class="oa-check__count">1<span class="oa-visually-hidden"> job</span></span>
  </label>
  <label class="oa-check">
    <input class="oa-check__input" name="crs-type" type="checkbox" value="contract">
    <span class="oa-check__label">Contract</span>
    <span class="oa-check__count">1<span class="oa-visually-hidden"> job</span></span>
  </label>
  <label class="oa-check">
    <input class="oa-check__input" name="crs-type" type="checkbox" value="volunteer">
    <span class="oa-check__label">Volunteer</span>
    <span class="oa-check__count">1<span class="oa-visually-hidden"> job</span></span>
  </label>
</fieldset>
<fieldset class="oa-fieldset">
  <legend class="oa-fieldset__legend">Date posted</legend>
  <label class="oa-check">
    <input class="oa-check__input" name="crs-posted" type="radio" value="any" checked>
    <span class="oa-check__label">Any time</span>
  </label>
  <label class="oa-check">
    <input class="oa-check__input" name="crs-posted" type="radio" value="1">
    <span class="oa-check__label">Last 24 hours</span>
  </label>
  <label class="oa-check">
    <input class="oa-check__input" name="crs-posted" type="radio" value="7">
    <span class="oa-check__label">Last 7 days</span>
  </label>
  <label class="oa-check">
    <input class="oa-check__input" name="crs-posted" type="radio" value="30">
    <span class="oa-check__label">Last 30 days</span>
  </label>
</fieldset>

A row with a hint, and the select-all box (script sets input.indeterminate = true while some rows are selected):

<label class="oa-check">
  <input class="oa-check__input" name="crs-phone" type="checkbox" checked>
  <span class="oa-check__label">Also share my mobile number</span>
  <span class="oa-check__hint"><bdi dir="ltr">+961 71 214 723</bdi></span>
</label>
<label class="oa-check">
  <input class="oa-check__input" id="crs-select-all" name="crs-select-all" type="checkbox">
  <span class="oa-check__label">Select all people shown</span>
</label>

A disabled group, and an error under the legend (Global ID's recovery link):

<fieldset class="oa-fieldset" disabled>
  <legend class="oa-fieldset__legend">Workplace</legend>
  <label class="oa-check">
    <input class="oa-check__input" name="crs-mode" type="checkbox" value="on-site" checked>
    <span class="oa-check__label">On-site</span>
    <span class="oa-check__count">8<span class="oa-visually-hidden"> jobs</span></span>
  </label>
  <label class="oa-check">
    <input class="oa-check__input" name="crs-mode" type="checkbox" value="hybrid">
    <span class="oa-check__label">Hybrid</span>
    <span class="oa-check__count">3<span class="oa-visually-hidden"> jobs</span></span>
  </label>
</fieldset>
<fieldset class="oa-fieldset">
  <legend class="oa-fieldset__legend">Recovery link</legend>
  <p class="oa-fieldset__error" id="crs-id-error"><span class="oa-icon oa-icon--filled" aria-hidden="true" translate="no">error</span>Tick the box once you have checked their ID in person.</p>
  <label class="oa-check">
    <input class="oa-check__input" name="crs-id-checked" type="checkbox" aria-invalid="true" aria-describedby="crs-id-error">
    <span class="oa-check__label">I checked Karim Nassar’s ID in person</span>
  </label>
</fieldset>

Switches, on and off (Global ID's security alerts), and disabled until the email address is confirmed:

<div class="oa-switch-field">
  <div class="oa-switch-field__text">
    <span class="oa-switch-field__label" id="crs-alert-device">Email me when someone signs in on a new device</span>
    <span class="oa-switch-field__hint" id="crs-alert-device-hint">Sent to <bdi dir="ltr">l•••@example.com</bdi></span>
  </div>
  <button class="oa-switch" type="button" role="switch" aria-checked="true" aria-labelledby="crs-alert-device" aria-describedby="crs-alert-device-hint"><span class="oa-switch__track"><span class="oa-switch__thumb"><span class="oa-icon" aria-hidden="true" translate="no">check</span></span></span></button>
</div>
<div class="oa-switch-field">
  <div class="oa-switch-field__text">
    <span class="oa-switch-field__label" id="crs-alert-methods">Email me when my sign-in methods change</span>
    <span class="oa-switch-field__hint" id="crs-alert-methods-hint">Sent to <bdi dir="ltr">l•••@example.com</bdi></span>
  </div>
  <button class="oa-switch" type="button" role="switch" aria-checked="false" aria-labelledby="crs-alert-methods" aria-describedby="crs-alert-methods-hint"><span class="oa-switch__track"><span class="oa-switch__thumb"><span class="oa-icon" aria-hidden="true" translate="no">check</span></span></span></button>
</div>
<fieldset class="oa-fieldset" disabled>
  <legend class="oa-fieldset__legend">Alerts</legend>
  <p class="oa-fieldset__hint">Confirm your email to receive security alerts.</p>
  <div class="oa-switch-field">
    <div class="oa-switch-field__text">
      <span class="oa-switch-field__label" id="crs-alert-off">Email me when someone signs in on a new device</span>
    </div>
    <button class="oa-switch" type="button" role="switch" aria-checked="false" aria-labelledby="crs-alert-off"><span class="oa-switch__track"><span class="oa-switch__thumb"><span class="oa-icon" aria-hidden="true" translate="no">check</span></span></span></button>
  </div>
  <div class="oa-switch-field">
    <div class="oa-switch-field__text">
      <span class="oa-switch-field__label" id="crs-alert-on">Email me when my sign-in methods change</span>
    </div>
    <button class="oa-switch" type="button" role="switch" aria-checked="true" aria-labelledby="crs-alert-on"><span class="oa-switch__track"><span class="oa-switch__thumb"><span class="oa-icon" aria-hidden="true" translate="no">check</span></span></span></button>
  </div>
</fieldset>

Arabic:

<div dir="rtl" lang="ar">
  <fieldset class="oa-fieldset">
    <legend class="oa-fieldset__legend">نوع العمل</legend>
    <label class="oa-check">
      <input class="oa-check__input" name="crs-type-ar" type="checkbox" value="full-time" checked>
      <span class="oa-check__label">دوام كامل</span>
      <span class="oa-check__count">12<span class="oa-visually-hidden"> وظيفة</span></span>
    </label>
    <label class="oa-check">
      <input class="oa-check__input" name="crs-type-ar" type="checkbox" value="part-time">
      <span class="oa-check__label">دوام جزئي</span>
      <span class="oa-check__count">1<span class="oa-visually-hidden"> وظيفة</span></span>
    </label>
  </fieldset>
  <div class="oa-switch-field">
    <div class="oa-switch-field__text">
      <span class="oa-switch-field__label" id="crs-ar-alert">راسلني بالبريد عندما يسجّل أحد الدخول من جهاز جديد</span>
      <span class="oa-switch-field__hint" id="crs-ar-alert-hint">تُرسل إلى <bdi dir="ltr">l•••@example.com</bdi></span>
    </div>
    <button class="oa-switch" type="button" role="switch" aria-checked="true" aria-labelledby="crs-ar-alert" aria-describedby="crs-ar-alert-hint"><span class="oa-switch__track"><span class="oa-switch__thumb"><span class="oa-icon" aria-hidden="true" translate="no">check</span></span></span></button>
  </div>
</div>

Tailwind CSS v4

A checkbox row with a count (a radio row is the same with type="radio"):

<fieldset class="flex flex-col">
  <legend class="mb-1.5 text-label-md text-on-surface">Work type</legend>
  <label class="relative isolate flex min-h-12 cursor-pointer items-start gap-3 rounded-8px px-2 py-3 text-body-lg text-on-surface before:pointer-events-none before:absolute before:inset-0 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-disabled:cursor-default has-disabled:text-on-surface/38 has-disabled:**:text-on-surface/38 has-disabled:before:opacity-0">
    <input type="checkbox" name="type" value="full-time" class="mt-[calc((1lh-1.25rem)/2)] size-5 shrink-0 accent-primary-ink">
    <span class="min-w-0 flex-1 self-baseline">Full-time</span>
    <span class="self-baseline text-body-md tabular-nums text-on-surface-variant">12<span class="sr-only"> jobs</span></span>
  </label>
</fieldset>

With a hint, the label and the hint share one column: <span class="flex min-w-0 flex-1 flex-col"><span>Also share my mobile number</span><span class="text-body-md text-on-surface-variant">…</span></span>. The box's top margin is 2px on a Latin line (D-CAI-12) and centers it on the taller Arabic line. A disabled row dims everything in it, the count and the hint included (has-disabled:**:text-on-surface/38), as the reference CSS does.

A setting row with a switch:

<div class="flex min-h-12 items-center gap-4 py-3">
  <div class="flex min-w-0 flex-1 flex-col">
    <span id="alert-device" class="text-title-sm text-on-surface">Email me when someone signs in on a new device</span>
    <span id="alert-device-hint" class="text-body-md text-on-surface-variant">Sent to <bdi dir="ltr">l•••@example.com</bdi></span>
  </div>
  <button type="button" role="switch" aria-checked="true" aria-labelledby="alert-device" aria-describedby="alert-device-hint" class="relative isolate inline-flex h-12 w-16 shrink-0 cursor-pointer items-center justify-center rounded-full text-on-surface before:pointer-events-none before:absolute before:inset-0 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 disabled:cursor-default disabled:before:opacity-0">
    <span class="relative block h-8 w-13 rounded-full border-2 border-outline bg-surface-container-highest transition-colors duration-short-3 ease-standard in-aria-checked:border-transparent in-aria-checked:bg-primary-ink in-disabled:border-on-surface/12 in-disabled:bg-on-surface/12 in-aria-checked:in-disabled:border-transparent in-aria-checked:in-disabled:bg-on-surface/12">
      <span class="absolute inset-y-0 start-1.5 my-auto flex size-4 items-center justify-center rounded-full bg-outline text-primary-ink transition-[inset-inline-start,width,height,background-color] duration-short-4 ease-standard in-aria-checked:start-5.5 in-aria-checked:size-6 in-aria-checked:bg-surface-container-lowest in-disabled:bg-on-surface/38 in-aria-checked:in-disabled:bg-surface-container-lowest in-aria-checked:in-disabled:text-on-surface/38">
        <span class="oa-icon oa-icon--xs opacity-0 transition-opacity duration-short-3 ease-standard in-aria-checked:opacity-100" aria-hidden="true" translate="no">check</span>
      </span>
    </span>
  </button>
</div>

The in-aria-checked and in-disabled variants style the track and the thumb from the button's own state, with no marker class; the ring comes from the base CSS. The script toggles aria-checked on click.

shadcn's Radix checkbox (Checkbox) takes the drawn geometry: size-5 shrink-0 rounded-4px border-2 border-outline data-[state=checked]:border-primary-ink data-[state=checked]:bg-primary-ink data-[state=checked]:text-surface data-[state=indeterminate]:border-primary-ink data-[state=indeterminate]:bg-primary-ink data-[state=indeterminate]:text-surface, inside the same 48px label row (canonical §10.5). shadcn's RadioGroupItem takes the drawn ring: size-5 shrink-0 rounded-full border-2 border-outline data-[state=checked]:border-primary-ink, with a 10px dot as the indicator (size-2.5 rounded-full bg-primary-ink) (D-CAI-12).

React

<CheckboxGroup legend={t('jobs.filters.type')}>
  <Checkbox name="type" value="full-time" label={t('jobs.type.fullTime')} count={12} countLabel={(n) => t('jobs.count', { n })} />
</CheckboxGroup>

<SwitchField
  label={t('security.alerts.newDevice.label')}
  hint={t('security.alerts.sentTo', { email })}
  checked={on}
  onCheckedChange={save}
/>
Prop Type Default Description
label ReactNode required The visible label (Checkbox, Radio, SwitchField).
hint ReactNode — One more line under the label.
count number — A tabular count at the inline end (Checkbox).
countLabel (n: number) => string — The visually hidden words read with the count ("12 jobs").
checked boolean — Controlled state; defaultChecked when uncontrolled.
indeterminate boolean false Sets input.indeterminate (Checkbox).
onCheckedChange (checked: boolean) => void — Called with the new state.
invalid boolean false Sets aria-invalid; the group shows the message.
name, value string — The form value (Checkbox, Radio).
legend, hint, error string — The group's legend, hint, and error (CheckboxGroup, RadioGroup).

Switch on its own takes checked, onCheckedChange, labelledBy (the id of the visible name), describedBy, and the disabled attribute; it takes an aria-label only when no visible name exists (D-CAI-13).