Skip to the page
TACTILE UI

Kit part · Radio groups

Radio

One choice from a short list in a form: small round keys in a fieldset, the chosen one pressed with a printed dot.

Element
<input type="radio">
Needs
kit.css
Rules
choice.rules.md · 3
Finishes
Aluminium · Graphite · Porcelain · Black
Volumes
Tactile · Quiet
On this page
  1. Variants
  2. Every state, at once
  3. API
  4. Markup
  5. Accessibility
  6. How it’s built
  7. Rules
  8. Related parts
01

Variants

Stacked
In a row
02

Every state, at once

Both finishes, side by side. Hover, pressed and focus are forced with .is-hover, .is-down and .is-focus; checked and disabled are real.

Aluminium

PartOffOnFocus
Radio

Graphite

PartOffOnFocus
Radio
03

API

NameKindValuesWhat it does
.tui-radioclasson <input type="radio">An 18px round key. Checked: pressed, with a printed dot.
.tui-choiceclasson <label>The key and its words, 8px apart.
name · value · checkedattribute—Native: one name per group; the form posts the checked value.
<fieldset> · <legend>element—Groups the radios and names the group.
changeevent—Native, on the radio that became checked.
Arrowskeyboard—Move the choice within the group.
04

Markup

<fieldset>
  <legend class="tui-label">Channels</legend>
  <label class="tui-choice"><input type="radio" class="tui-radio" name="ch" value="mono" checked> Mono</label>
  <label class="tui-choice"><input type="radio" class="tui-radio" name="ch" value="stereo"> Stereo</label>
</fieldset>

Needs kit.css only, no script. How to install the kit.

05

Accessibility

  • Group radios in a <fieldset> with a <legend>; screen readers then read “Channels, Mono, radio, 1 of 3”.
  • One Tab stop for the group; arrows move the choice.
  • For a machine’s mode or a view filter, the selector is the same radio group, drawn as latching keys.
06

How it’s built

A native radio with appearance: none: the same small skirted key as the check, with a round cap. Chosen, it drops 1.5px under the pressed light and prints a dot, an ::after circle in --tui-ink.

07

Rules

choice.rules.mdIn the brain

Radios sit under a legend that names the group; past five choices, a select reads better.

3 rules in this file, with the foundations they rest on and the anti-patterns that break them. Full rules ship in the brain with the Pass.

08

Check

An option in a form: a small square key that presses below the plate when chosen, with a tick printed on it.

Selector

One mode of two to five: latching keys in a tray, one down at a time, each with a lamp that lights when chosen.

Select

A choice from a longer list, in the same recess as a field, with a printed chevron. The browser’s own menu opens it.

Docs
Finish
Volume