Radio group
radio-groupA choice of exactly one option. The selected dot travels between options on a spring, each option carries its own label and optional description, and arrow keys move the selection in the direction the options are laid out.
import { Radio, RadioGroup } from "@/components/forme/radio-group/radio-group";
export function RadioGroupDemo() {
return (
<div className="flex max-w-md flex-col gap-8">
<RadioGroup defaultValue="daily" aria-label="Digest frequency">
<Radio
value="daily"
label="Daily digest"
description="One email each morning with everything from the previous day."
/>
<Radio
value="weekly"
label="Weekly summary"
description="Every Monday, grouped by project and ordered by activity."
/>
<Radio
value="never"
label="Never"
description="You can still read everything from the dashboard."
/>
</RadioGroup>
<RadioGroup defaultValue="yearly" className="flex-row flex-wrap gap-x-6 gap-y-3">
<Radio value="monthly" label="Monthly — $12" />
<Radio value="yearly" label="Yearly — $129" />
<Radio value="lifetime" label="Lifetime — $199" disabled />
</RadioGroup>
</div>
);
}Install
Adds the component, its registry dependencies, and the token stylesheet you import once.
Usage
import { Radio, RadioGroup } from "@/components/forme/radio-group/radio-group";
<RadioGroup defaultValue="daily" aria-label="Digest frequency">
<Radio value="daily" label="Daily digest" description="One email each morning." />
<Radio value="weekly" label="Weekly summary" description="Every Monday." />
</RadioGroup>When to use
Reach for it
- Two to five mutually exclusive options that should stay visible, so the choice can be compared rather than recalled from a closed menu.
descriptionwhen the label alone cannot carry the consequence — what happens, when, or which one is recommended.- A horizontal group for short labels, by giving
RadioGroupaflex-rowclass; the arrow keys follow the layout either way.
Use something else
- More than about six options: a
Selectkeeps the page short and the keyboard path obvious. - Making one option selected by default when "none" is a real answer — start from
undefined, not the first item.
API reference
Read from the source, so it is the API of the file you install. A prop marked * is required.
Radio
One option, with its label.
| Prop | Type | Default | Description |
|---|---|---|---|
label | ReactNode | — | The visible label, rendered beside the control and part of the click target. |
description | ReactNode | — | Supporting text under the label. Announced as the description rather than as part of the name, so the control is still "Daily digest" and not that plus the sentence explaining it. |
Also takes every prop of Base UI Radio.Root.
The other parts
RadioGroupTakesComponentProps<typeof RadioGroupPrimitive>
Accessibility
- One tab stop per group: the checked option is reachable, arrows move between options and select as they arrive, exactly like a native radio.
- The label is a real
<label>bound to the hidden input, so the text is part of the target and works with a screen reader's form navigation. descriptionisaria-describedby, not folded into the name, so the option is announced as "Daily digest" and then explained.
Motion
- The spring is the information: one dot moving between options says the value changed, where a second dot appearing would say the control was replaced.
- Reduced motion keeps the travel but removes the spring, so the dot is in its new place on the next frame.
Responsive behaviour
- Options stack by default;
flex-rowwithflex-wrapsuits short labels and wraps rather than overflowing on narrow screens. - A description makes the option taller, so the row aligns to the top of the label block instead of its centre.
Related


Checkbox
A single choice with a visible label wired to it for a screen reader. An indeterminate state for a select-all with only some rows picked, a description read as a description rather than folded into the name, a destructive variant, and a mark that draws itself in.
forms

Poll
A question to vote on that turns into its results in place: bars grow to each share, the percentages roll and always total 100, and your choice is marked. Single or multiple choice, on real radios and checkboxes.
forms

Select
A choice from a list too long for radio buttons. Grouped with labels, an inline check on the selected option, typeahead and arrow-key navigation from the Base UI select primitive, and a label in the trigger that rolls in the direction of the list — down for a later option, up for an earlier one.
forms