What it does
Coordinate exclusive selection across related radio items.
Use RadioGroup when exactly one option should be selected from a known list.
Composition and API
Use RadioGroup as the root and RadioGroupItem for each option. The root owns value, defaultValue, onValueChange, orientation, size, appearance, required, and disabled state.
Common use cases
- Plan selection in pricing and billing flows.
- Single-choice survey questions.
- Delivery or payment method selection.
- Settings where one mode must be active.
Accessibility
The component renders a radiogroup wrapper and native radio inputs. Provide an aria-label or external label for the group, and keep each item label clear.
Next.js integration notes
Keep controlled RadioGroup examples in client components. Use defaultValue for simple server-rendered defaults in App Router pages.
FAQ
Does RadioGroup manage exclusive selection?
Yes. RadioGroupItem components receive the group name and selected value from context, so only one item in the group is selected.
Can RadioGroup be horizontal?
Yes. Set orientation="horizontal" on RadioGroup for compact rows of options.
Is there an animated RadioGroup?
Yes. Import RadioGroupAnimated and RadioGroupItemAnimated from the animated entrypoint for a spring or fade selected indicator.