Radio Group
One-of-many selection. Pair RadioGroup with RadioGroupItem entries; bind selected value with v-model.
Default
Three options arranged vertically.
Usage
Import the parts you need from the component's folder.
ts
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";Horizontal
Lay items horizontally with flex.
Disabled
Pass disabled on the group to disable every item.
With descriptions
Pair each option with a FieldLabel and a muted FieldDescription inside FieldContent for extra context.
Choice cards
Wrap each Field in a FieldLabel to render options as bordered, selectable cards. The checked card is highlighted automatically.
Fieldset with legend
Group the RadioGroup inside a FieldSet with a FieldLegend heading and a FieldDescription.
Invalid
Set data-invalid on the FieldSet and aria-invalid on each item, then surface the message with FieldError.
API Reference
RadioGroup
RadioGroupItem
Accessibility
Keyboard shortcuts and ARIA behavior.
- Uses a roving tabindex; only the selected (or first) radio is tabbable.
- Applies radiogroup and radio roles with aria-checked on each item.