RadioGroup

Interactive documentation for RadioGroup and RadioGroupItem. Change props in the playground, inspect sizes, colors, orientation, slots, and events.

selected: opt-1

Preview

Example *

Code

<RadioGroup
  v-model="selected"
  :items="items"
  label="Example"
  required
/>

Sizes

All available RadioGroup sizes.

xs

s

m

l

xl

Colors

Available color variants.

midnight

basil

red

amber

States

Dedicated examples for disabled, error, required, optional, and horizontal states.

Disabled

Disabled group *

Error

Error group *

Optional unselect

Click selected option again to clear

Horizontal

Horizontal group *

Slots

Example with custom label slot and meta slot for trailing price.

Distributor options

From Distributor

Ships in 2–3 weeks

Selected value

empty

Props, Events & Slots

These tables match the current RadioGroup and RadioGroupItem APIs.

RadioGroup props

Props accepted by the group wrapper component.

PropTypeDefaultRequiredDescription
modelValueRadioValue''RequiredCurrent selected radio value. Used with v-model binding.
itemsRadioGroupItemOption[]undefinedOptionalArray of radio options rendered by default slot implementation.
labelstring''OptionalGroup legend text displayed above radio items.
requiredbooleanfalseOptionalShows required marker and prevents unselecting the current value.
disabledbooleanfalseOptionalDisables the whole radio group.
errorbooleanfalseOptionalApplies error styles to group label and items.
size'xs' | 's' | 'm' | 'l' | 'xl''m'OptionalControls radio circle, dot, label, description, and spacing size.
color'midnight' | 'basil' | 'red' | 'amber''midnight'OptionalControls radio active, hover, and focus color.
orientation'vertical' | 'horizontal''vertical'OptionalControls items layout direction.
namestringauto-generatedOptionalNative radio input name. If omitted, component generates a unique group name.

RadioGroupItem props

Props accepted by the item component when used manually.

PropTypeDefaultRequiredDescription
valueRadioValueundefinedRequiredRadio item value emitted when selected.
labelstring''OptionalRadio item label.
descriptionstringundefinedOptionalHelper text displayed below the radio item label.
requiredbooleanfalseOptionalShows required marker next to the radio item label.
checkedbooleanfalseOptionalControls checked state for custom item usage.
disabledbooleanfalseOptionalDisables the radio item.
errorbooleanfalseOptionalApplies error styles to label and description.
size'xs' | 's' | 'm' | 'l' | 'xl''m'OptionalControls item visual size.
color'midnight' | 'basil' | 'red' | 'amber''midnight'OptionalControls item active, hover, and focus color.
idstringundefinedOptionalNative input id attribute.
namestringundefinedOptionalNative input name attribute.

Item option shape

FieldTypeRequired
labelstringRequired
valueRadioValueRequired
descriptionstringOptional
idstringOptional
disabledbooleanOptional
requiredbooleanOptional

Events

EventPayloadDescription
update:modelValueRadioValueEmitted when selected value changes.
changeRadioValueEmitted together with update:modelValue after user selection changes.

Slots

SlotPropsDescription
label{ label, required, error }Overrides group legend content.
item{ option, checked, select }Overrides rendering of each item from items array.
meta{ item, checked }Adds trailing meta content inside each default RadioGroupItem.
default{ modelValue, size, color, disabled, error, name, required, select }Full custom rendering slot for advanced use cases.