BlogPlaygroundOne

Radio buttons

The v-radio component is a simple radio button. When combined with the v-radio-group component you can provide grouping functionality to allow users to select from a predefined set of options.

Usage

Although v-radio can be used on its own, it is best used in conjunction with v-radio-group.

<v-radio-group> <v-radio label="Radio One" value="one"></v-radio> <v-radio label="Radio Two" value="two"></v-radio> <v-radio label="Radio Three" value="three"></v-radio> </v-radio-group>

API

ComponentDescription
v-radio-groupPrimary Component
v-radioSub-component used for modifying the v-radio-group state
Toggle Inline API

Examples

Props

Model (group)

Using the v-model (or model-value) you can access and control the selected radio button defined by the set value on the child v-radio components.

Selected Button: one

Model (radio)

The v-model (or model-value) you can access and control the value of a single radio button. The true/false values can be independently defined using the true-value and false-value props.

Colors

Radios can be colored by using any of the builtin colors and contextual names using the color prop.

Direction

Radio-groups can be presented either as a row or a column, using their respective props. The default is as a column.


Slots

Label

Radio Group labels can be defined in label slot - that will allow to use HTML content.

Ready for more?

Continue your learning with related content selected by the Team or move between pages by using the navigation links below.