Radio Group

A set of mutually exclusive options. Built on Radix primitives with keyboard navigation and focus management.

Basic

<RadioGroup defaultValue="medium">
  <div className="flex items-center gap-2">
    <RadioGroupItem value="small" id="small" />
    <Label htmlFor="small">Small</Label>
  </div>
  <div className="flex items-center gap-2">
    <RadioGroupItem value="medium" id="medium" />
    <Label htmlFor="medium">Medium</Label>
  </div>
  <div className="flex items-center gap-2">
    <RadioGroupItem value="large" id="large" />
    <Label htmlFor="large">Large</Label>
  </div>
</RadioGroup>

API Reference

PropTypeDefaultDescription
valuestringThe controlled value of the selected radio item.
onValueChange(value: string) => voidCallback fired when the selected value changes.
defaultValuestringThe default value when uncontrolled.
disabledbooleanfalseWhen true, disables all radio items in the group.