Radio

A binary input that always exists in a group, in which only one input can be on at a time.

Typical use will involve using v-for to loop through an array of items and output a Radio component for each one. Each Radio will have the same v-model and name props, but different inputValue props and label content.

The v-model value is the inputValue of the Radio that is currently on.

Demos

Radio group

Radio group value: radio-2

Inline radios

Usage

Props

Prop nameDescriptionTypeValuesDefault
modelValueValue provided by v-model in a parent component.

Rather than directly binding a value prop to this component, use
v-model to bind a string, number, or boolean value. This value
represents the value of the radio input that is currently on.
modelValueProp-
inputValueHTML "value" attribute to assign to the input.

Required for input groups.
string|number|boolean-false
nameHTML "name" attribute to assign to the input.

Required for input groups
string-''
disabledWhether the disabled attribute should be added to the input.boolean-
inlineWhether the component should display inline.

By default, display: block is set and a margin exists between
sibling components, for a stacked layout.
boolean-

Events

Event namePropertiesDescription
update:modelValue

Slots

NameDescriptionBindings
defaultInput label content

Last updated: