Skip to content

Radio ​

In a set of related and mutually exclusive data, the user can only select one option.

Basic usage ​

Bind a variable to Radio s v-model. It equals to the value of label of the chosen radio. The type of label is String, Number or Boolean.

Disabled ​

Disabled attribute is used to disable the radio. You just need to add the disabled attribute.

Radio group ​

Suitable for choosing from some mutually exclusive options. Combine tu-radio-group with tu-radio to display a radio group. Bind a variable with v-model of tu-radio-group element and set label value in tu-radio. It also provides change event with the current value as its parameter.

Radio group styles ​

Checkbox with button / border style.

Button Style

Border Style

Sizes ​

Besides default size, tu-radio-group component provides three additional sizes for you to choose among different scenarios. Use attribute size to set additional sizes with mini, small, large.

mini

small

medium

large

mini

small

medium

large

mini

small

medium

large

Radio API ​

Radio Attributes ​

NameDescriptionTypeDefault
v-modelBinding valueString Number Boolean-
labelThe value of RadioString Number Boolean-
disabledWhether Radio is disabledBooleanfalse
typeType of the RadioString-
sizeSize of the RadioStringmedium
nameNative name attributeString-

Radio Events ​

NameDescriptionType
changeTriggers when the bound value changesFunction

Radio Slots ​

NameDescription
defaultCustomize default content

RadioGroup API ​

RadioGroup Attributes ​

NameDescriptionTypeDefault
v-modelBinding valueString Number Boolean-
typeType of the RadioGroupString-
sizeSize of the RadioGroupStringmedium
disabledWhether the nesting radios are disabledBooleanfalse
text-colorFont color when button is activeString-
validate-eventWhether to trigger form validationBooleantrue
labelSame as aria-label in RadioGroupString-
nameNative name attributeString-
idNative id attributeString-

RadioGroup Events ​

NameDescriptionType
changeTriggers when the bound value changesFunction

RadioGroup Slots ​

NameDescriptionType
defaultCustomize default contentRadio