mica

Example

Leaderboard period

Basic usage

<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>

API

m-segmented fuses the presentation of a native radio group. It adds no attributes or JavaScript behavior.

Content/markup contracts

ContentContractDefaultDescription
Direct childrenlabel wrapping one radioEach direct label carries the visual state of its native radio.
Radio groupshared name, distinct valuesPreserves native mutual exclusion, keyboard navigation, focus, form values, and assistive-technology semantics.
Group namefieldset and legendWrap the control to provide an accessible name for the choice set.

Styling

TargetValueDefaultDescription
m-segmentedinline fused controlcontent widthChecked, focus-visible, and disabled presentation is derived from each enclosed native radio.
← radioswitch →