Radio

Form
v1.0.0
stable

Radio button component for selecting a single option from a set.

Preview

npx inam-ui add radio

Usage Examples

Radio Group

Selection within a group of options

<Radio name="choice" label="Option A" value="a" />
<Radio name="choice" label="Option B" value="b" />

Accessibility

Keyboard Navigation

  • Arrow Keys - Move focus and select between radio buttons in a group
  • Space - Select focused radio button

ARIA Labels

  • role='radio'
  • aria-checked

Props

NameTypeDefaultDescription
labelstringLabel text for the radio button.
checkedbooleanfalseWhether the radio is selected.
valuestringValue of the radio button.
namestringName of the radio group.

Related Components