Radio Group
A set of checkable buttons—known as radio buttons—where no more than one of the buttons can be checked at a time.
Installation
terminal
npx felicityui add radio-group --platform reactUsage
example.tsx
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group"
<RadioGroup defaultValue="option-one">
<RadioGroupItem value="option-one" label="Option One" />
<RadioGroupItem value="option-two" label="Option Two" />
</RadioGroup>Composition
RadioGroup ├── RadioGroupItem └── RadioGroupItem
Default
Description
Items with helper text under the label.
Choice card
Wrap the control in a clickable card surface.
Fieldset
Legend and description on the group.
Disabled
disabled on RadioGroup disables all items.
Invalid
aria-invalid and data-invalid on the group.
RTL
dir=rtl
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| value | string | — | Controlled selected value. |
| defaultValue | string | — | Uncontrolled initial value. |
| onValueChange | (value: string) => void | — | Called when the selected value changes. |
| label | ReactNode | — | Fieldset legend. |
| description | ReactNode | — | Group helper text. |
| error | ReactNode | — | Group error message; sets invalid styling. |
| invalid | boolean | — | Marks the group invalid. |
| orientation | vertical | horizontal | vertical | Layout direction for items. |
| disabled | boolean | — | Disables all items. |
| RadioGroupItem.value | string | — | Item value. |
| RadioGroupItem.label | ReactNode | — | Optional item label. |
| RadioGroupItem.description | ReactNode | — | Optional item helper text. |
Accessibility
WCAG 2.2 AA
- Native radio inputs sharing a name.
- Fieldset/legend or labelled items.
- Visible
focus-visiblering. aria-invalidanddata-invalidwhen invalid.
Platform notes
React
Native HTML radios with Felicity semantic tokens. Copper indicator when selected — not Base UI / Radix runtime.
- Client component (value state).
- Uses
data-slot=radio-group|radio-group-item|radio-group-indicator. - Field chrome uses
data-slot=field|field-label|field-description. - Supports value / defaultValue / onValueChange; RadioItem is an alias of RadioGroupItem.