Skip to content
On this page

Radio

Select an option from a set

Examples

Base

Selection: Jack

Show code

Variants

Selection: default

Show code

Sizes

Selection: small

Show code

Class props

'Classes applied to the element'
How does the Class props inspector work?
Class propDescriptionPropsSuffixes
checkCheckedClassClass of the native radio element when checked.
checkClassClass of the native radio element.
checkedClassClass of the root element when checked.
disabledClassClass when radio is disabled.disabled
labelClassClass of the radio label.
rootClassClass of the root element.
sizeClassClass of the radio size.sizesmall
medium
large
variantClassClass of the radio variant.variantprimary
info
warning
danger

Radio component

html
<o-radio></o-radio>

Props

Prop nameDescriptionTypeValuesDefault
ariaLabelledbyAccessibility label to establish relationship between the checkbox and control labelstring-
disabledSame as native disabledboolean-
labelInput label, unnecessary when default slot is usedstring-undefined
nameSame as native namestring-
nativeValueSame as native valuestring|number|boolean|array-
overrideboolean-
requiredboolean-
sizeSize of the control, optionalstringsmall, medium, large
v-modelstring|number|boolean|array-
variantColor of the control, optionalstringprimary, info, success, warning, danger, and any other custom color

Events

Event namePropertiesDescription
update:modelValue
input

Slots

NameDescriptionBindings
default

Sass variables

Current theme ➜ Oruga Base

SASS VariableDefault
$radio-active-background-color$primary
$radio-checked-box-shadow-length0 0 0.5em
$radio-checked-box-shadow-opacity0.8
$radio-disabled-opacity$base-disabled-opacity
$radio-label-padding0 0 0 0.5em
$radio-margin-sibiling0.5em
$radio-size1rem
$radio-line-height1.25

See ➜ 📄 Full scss file

Current theme ➜ Oruga Full

SASS VariableDefault
$radio-active-background-color$primary
$radio-checked-box-shadow-length0 0 0.5em
$radio-checked-box-shadow-opacity0.8
$radio-disabled-opacity$base-disabled-opacity
$radio-label-padding0 0 0 0.5em
$radio-margin-sibiling0.5em
$radio-size1rem
$radio-line-height1.25

See ➜ 📄 Full scss file

Current theme ➜ Bulma

The theme does not have any custom variables for this component.

Current theme ➜ Bootstrap

The theme does not have any custom variables for this component.

Released under the MIT License.