Skip to content

Forms

Radio Group

Native radios grouped under role="radiogroup".

stableNo JS requiredBuilt on <input type="radio">hydrateless/radio.css

A set of native radios grouped under role="radiogroup". Sharing a name gives you single-selection and arrow-key navigation for free, with no JavaScript.

Playground

Live

Props

The framework bindings expose these props (and forward the rest to the root element).

PropTypeDefaultDescription
valuestringSelected value; pair with `onValueChange`.
defaultValuestringInitial value (uncontrolled).
orientation'vertical' | 'horizontal''vertical'Layout direction.

CSS variables

Override these on any ancestor to theme the component. See the theme studio to preview changes live.

CSS variableUsed for
--hl-primaryDot and ring of the selected radio.
--hl-borderBorder of unselected radios.

Accessibility

  • A shared name makes the browser enforce single selection and arrow-key roving.
  • role="radiogroup" exposes the set as one control to assistive technology.

Released under the MIT License.