Components

Radio Group

A set of mutually exclusive options where exactly one item can be selected at a time. Built on Radix UI with full keyboard navigation and roving focus.

Basic usage

Pair each RadioGroupItem with a Label and set defaultValue for an uncontrolled group.

Card selection

Wrap each item in a Label and use the has-[:checked] selector to highlight the selected card with the brand gold accent.

Disabled items

Add disabled to a single RadioGroupItem to skip it during keyboard navigation, or to the group to disable every option.

Props

RadioGroup

PropTypeDefaultDescription
defaultValuestringThe value of the item checked by default in an uncontrolled group.
valuestringThe controlled value of the checked item. Pair with onValueChange.
onValueChange(value: string) => voidCallback fired when the selected item changes.
orientation'horizontal' | 'vertical''vertical'Orientation used for keyboard arrow navigation.
disabledbooleanfalseDisables every item in the group.
requiredbooleanfalseMarks selection as required when used inside a form.
namestringThe name submitted with the group in a native form.
classNamestringAdditional Tailwind classes to merge.

RadioGroupItem

PropTypeDefaultDescription
valuerequiredstringThe unique value this item represents.
disabledbooleanfalseDisables this individual item.
idstringElement id, used to associate a Label via htmlFor.
classNamestringAdditional Tailwind classes to merge.

Accessibility

  • Implements the WAI-ARIA radio group pattern with role="radiogroup" and roving tabindex — the group is a single Tab stop.
  • Arrow keys move between options and select them; Space selects the focused item, and disabled items are skipped.
  • Associate each item with a Label via matching id / htmlFor so the label is announced and becomes a click target.
  • A focus-visible ring using the brand gold ring token marks the focused item during keyboard navigation.