‮Skip to content‬
uiify

Radio group

‮Group of native radio inputs with roving keyboard focus.‬

‮Browsers‬
Chrome 123+Firefox 121+Safari 17.5+
‮Tier‬
0
‮Bundle compressed‬
946 B
‮Forced layout budget‬
0 ms
‮Axe budget‬
0
‮SSR compatible‬
‮Yes‬
‮Built on‬
elements/choice
‮Published contract‬
‮Test harness‬

‮Playground‬

Radio group

‮Default‬

‮API‬

RadioGroup

‮Prop‬‮Type‬‮Default‬‮Description‬
id*string—‮Id prefix for the group and for each generated radio input.‬
items*RadioGroupItem[]—‮Options to render; the group is data-driven rather than compound.‬
defaultValuestring—‮Value checked on first render; the browser owns selection from then on, so the group works without JavaScript.‬
namestring—‮Form field name shared by every radio input in the group.‬
disabledbooleanfalse‮Disables every radio in the group.‬
orientation"horizontal" | "vertical""vertical"‮Layout direction reported to assistive technology and used for styling.‬
classNamestring—‮Class applied to the group element.‬
aria-labelstring—‮Accessible name for the radio group.‬

RadioGroupItem

‮Prop‬‮Type‬‮Default‬‮Description‬
value*string—‮Value submitted when this radio is selected.‬
label*ReactNode—‮Label content rendered next to this radio.‬
disabledboolean—‮Disables this radio only.‬
classNamestring—‮Class applied to this item's wrapper.‬

‮Keyboard‬

‮Key‬‮Action‬
Tab‮Move focus to the group‬
Arrow keys‮Rove and select between options‬

‮Accessibility‬

‮Native radio inputs in a roving-focus group.‬

‮Styling hooks‬

data-statedata-disabled