← All Components

RadioGroup

Select one option from a set. Built on Radix Radio Group.

Default

Variants

Default

Outline

Solid

Sizes

Small

Medium

Large

Form Example

Disabled

Props

RadioGroup

PropTypeDescription
defaultValuestringInitially selected value
valuestringControlled selected value
onValueChange(value: string) => voidChange handler
disabledbooleanDisable all items
classNamestringAdditional classes on root

RadioGroup.Item

PropTypeDescription
valuestringValue for this item (required)
variant"default" | "outline" | "solid"Visual style
size"sm" | "md" | "lg"Radio size
disabledbooleanDisable this item

Usage

<RadioGroup defaultValue="option-1"> <div className="flex items-center gap-2"> <RadioGroup.Item value="option-1" id="r1" /> <Label htmlFor="r1">Option One</Label> </div> <div className="flex items-center gap-2"> <RadioGroup.Item value="option-2" id="r2" /> <Label htmlFor="r2">Option Two</Label> </div> </RadioGroup>