Components
RadioGroup
Container for a group of radio buttons. Manages single selection state.
Usage
Best practices
Use
RadioGroupfor one choice among a small closed set; for many searchable options useSelect/Combobox, and for on/off useSwitch/Checkbox.Drive selection with
value+onValueChange(controlled) ordefaultValue(uncontrolled) - don't set both on the same group.Prefer
RadioGroupItem(radio + wiredLabel) over hand-pairingRadioandLabel; it auto-generates theid/htmlForlink.
Props
Also exports
- component
RadioGroup - type
RadioGroupItemProps