A radio group allows a user to select a single item from a list of mutually exclusive options.
<RadioGroup defaultValue="sm">
<Label>Size</Label>
<FieldGroup>
<Radio value="sm">
<RadioIndicator />
<Label>Small</Label>
</Radio>
<Radio value="md">
<RadioIndicator />
<Label>Medium</Label>
</Radio>
<Radio value="lg">
<RadioIndicator />
<Label>Large</Label>
</Radio>
</FieldGroup>
</RadioGroup>npx shadcn@latest add @dotui/radio-groupUse radio group to allow users to select a single option from a short list of related options.
import { Radio, RadioGroup, RadioIndicator } from "@/components/ui/radio-group";<RadioGroup defaultValue="sm">
<Radio value="sm">
<RadioIndicator />
<Label>Small</Label>
</Radio>
<Radio value="md">
<RadioIndicator />
<Label>Medium</Label>
</Radio>
</RadioGroup>Use the controls below to experiment with different radio group props and see the live preview and code update.
The axis the Radio Button(s) should align with.
Orientation<RadioGroup defaultValue="md">
<Label>Select size</Label>
<FieldGroup>
<Radio value="sm">
<RadioIndicator />
<Label>Small</Label>
</Radio>
<Radio value="md">
<RadioIndicator />
<Label>Medium</Label>
</Radio>
<Radio value="lg">
<RadioIndicator />
<Label>Large</Label>
</Radio>
</FieldGroup>
</RadioGroup>A radio group allows a user to select a single item from a list of mutually exclusive options.
| Prop | Type | Default | |
|---|---|---|---|
boolean | — | ||
boolean | — | ||
Orientation | 'vertical' | ||
ReactNode | function | — | ||
string | null | — | ||
string | null | — | ||
function | — | ||
A radio represents an individual option within a radio group.
| Prop | Type | Default | |
|---|---|---|---|
RefObject<HTMLInputElement | null> | — | ||
boolean | — | ||
ReactNode | function | — | ||
Last updated on 1/13/2026
Bringing singularity to the web.
Built with passion by @mehdibha.