mica
Forms / segmented control

segmented control

Tier 1

A native radio group fused into one compact control. No script, no reconstructed ARIA.

Leaderboard period
<fieldset>
  <legend>View</legend>
  <m-segmented>
    <label><input type="radio" name="view" value="list" checked /> List</label>
    <label><input type="radio" name="view" value="grid" /> Grid</label>
  </m-segmented>
</fieldset>

Contract

Direct children are labels wrapping native radios that share a name and have distinct values. Wrap the control in a fieldset with a legend to name the choice set. The browser supplies keyboard navigation, focus, form values, and assistive-technology semantics. Mica only fuses their presentation.

← radioswitch →