Radio

The Radio component is a form control that allows users to select a single option from a list of choices. It can be used individually or as part of a RadioGroup for managing multiple related options.

Props

NameDefaultType
valueany
The value of the radio button
labelstring
The label text for the radio button
disabledfalseboolean
Whether the radio button is disabled
accentfalseboolean
Whether to use the accent color

Events

NamePayloadDescription
changeanyEmitted when the selected value changes

Slots

NameAcceptsDescription
defaultanyContent to be displayed as the label (overrides the label prop if provided)

Single vs Grouped

The Radio component can be used individually or grouped together within a RadioGroup.

<template>
  <Radio
    v-model="selected"
    value="option1"
    label="Single Option"
  />
</template>

When grouping, do not put v-model on the individual Radio components, but instead use the wrapper RadioGroup to control the selected value.

<template>
  <RadioGroup v-model="selected">
    <Radio value="option1" label="Option 1" />
    <Radio value="option2" label="Option 2" />
    <Radio value="option3" label="Option 3" />
  </RadioGroup>
</template>

RadioGroup Props

The RadioGroup component wraps its slot in a Flex component and also accepts all of its props to properly position the contents.

NameDefaultType
disabledfalseboolean
Whether all radio buttons in the group are disabled