Radio Group

One-of-many selection. Pair RadioGroup with RadioGroupItem entries; bind selected value with v-model.

Default

Three options arranged vertically.

Dark previewReplay previewOpen in new tab

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.

Dark previewReplay previewOpen in new tab

Disabled

Pass disabled on the group to disable every item.

Dark previewReplay previewOpen in new tab

With descriptions

Pair each option with a FieldLabel and a muted FieldDescription inside FieldContent for extra context.

Dark previewReplay previewOpen in new tab

Up to 3 projects with community support.

Unlimited projects, analytics, and email support.

Everything in Pro, plus roles and shared billing.

Choice cards

Wrap each Field in a FieldLabel to render options as bordered, selectable cards. The checked card is highlighted automatically.

Dark previewReplay previewOpen in new tab

Choose how quickly you want your order delivered.

Fieldset with legend

Group the RadioGroup inside a FieldSet with a FieldLegend heading and a FieldDescription.

Dark previewReplay previewOpen in new tab
Notify me about…

Choose which activity sends you a notification.

Invalid

Set data-invalid on the FieldSet and aria-invalid on each item, then surface the message with FieldError.

Dark previewReplay previewOpen in new tab
How should we reach you?

Select a contact method to continue.

API Reference

RadioGroup

PropTypeDefaultDescription
modelValuestring—Selected value. Supports v-model.
defaultValuestring—Initial value when v-model is not used.
disabledbooleanfalseDisable the entire group.
EventDescription
update:modelValueFires when the selected value changes. Enables v-model.

RadioGroupItem

PropTypeDefaultDescription
valuestring—Unique value tracked by the group.
idstring—Match with a Label for click targets.
disabledbooleanfalseDisable this item.

Accessibility

Keyboard shortcuts and ARIA behavior.

Shortcut Description
↑Moves selection to the previous item.
↓Moves selection to the next item.
←Moves selection to the previous item.
→Moves selection to the next item.
SpaceSelects the focused item.
TabMoves focus into or out of the group.
  • Uses a roving tabindex; only the selected (or first) radio is tabbable.
  • Applies radiogroup and radio roles with aria-checked on each item.