Usage
import { RadioGroup, RadioGroupItem, RadioGroupItemProps } from "@desk/ui/components/radio-group";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
| Prop | Type | Default | Description |
|---|---|---|---|
| children | React.ReactNode | Label text for the radio option | |
| size | ResponsiveSize | "sm" | Radio size — a single token or a per-breakpoint object like
|
Also exports
- component
RadioGroup - type
RadioGroupItemProps