Skip to main content

Radio

The Radio component serves as a basic radio button, enabling users to select a single option from a set of predefined choices.

When used in conjunction with the RadioGroup component, it allows for groupable functionality, presenting a cohesive set of radio buttons that facilitate user selection from multiple options.

info

For more details about Vuetify’s usage of Radio component, click Radio page.
For more prop explanations, click Vuetify Radio API page.

Props

AttributeDescriptionTypeDefault
activeClassChanges active radio's class.stringundefined
classConfigure the active CSS class applied when the qValue is true.stringundefined
darkApplies the dark theme.booleanfalse
disabledRemoves the ability to click or target the component.booleanfalse
errorPuts the input in a manual error state.booleanfalse
errorCountThe total number of errors that should display at once.number | string1
errorMessagesPuts the input in an error state and passes through custom error messages. Will be combined with any validations that occur from the rules prop. This field will not trigger validation.string | Array[]
labelSets input label.stringTest radio label
offIconThe icon used when inactive.stringundefined
onIconThe icon used when active.stringundefined
rippleApplies the ripple directive.boolean-stringtrue
successPuts the input in a manual success state.booleanfalse
successMessagesPuts the input in a success state and passes through custom success messages.string | array[]
tabIndexAllows component to give and receive focus.numberundefined
visibleVisibility of Radio component.booleantrue
valueThe value used when the component is selected in a group. If not provided, the index will be used.anyundefined

Events

AttributeDescription
changeEmitted when the input is changed by user interaction

RadioGroup

The RadioGroup component organizes multiple Radio buttons into a single, manageable group, ensuring that only one selection can be made at a time from the provided options.

Warnings

It should not be used independently; it should be within a RadioGroup.

Props

AttributeDescriptionTypeDefault
appendIconAppends an icon to the component, uses the same syntax as IconStringundifined
columnDisplays radio buttons in columnbooleantrue
darkApplies the dark theme variant to the component. This will default the components color to white unless you’ve configured your application theme to dark or if you are using the color prop on the component.booleanfalse
disabledDisable the inputbooleanfalse
errorPuts the input in a manual error statebooleanfalse
errorCountThe total number of errors that should display at oncenumber | String1
errorMessagesPuts the input in an error state and passes through custom error messages. Will be combined with any validations that occur from the rules prop. This field will not trigger validationString | array[]
hideDetailsHides hint and validation errors. When set to auto messages will be rendered only if there’s a message (hint, error message, counter value etc) to display.boolean-stringundefined
hintHint textStringundefined
labelSets input labelStringundefined
mandatoryForces a value to always be selected (if available).booleanfalse
maxSets a maximum number of selections that can be made.number | Stringundefined
multipleAllow multiple selections. The value prop must be an array.booleanfalse
persistentHintForces hint to always be visiblebooleanfalse
prependInnerIconPrepends an icon to the component, uses the same syntax as IconStringundefined
rowDisplays radio buttons in rowbooleanfalse
readonlyPuts input in readonly statebooleanfalse
successPuts the input in a manual success statebooleanfalse
successMessagesPuts the input in a success state and passes through custom success messages.String | array[]
validateOnBlurDelays validation until blur eventbooleanfalse
valueComparatorApply a custom value comparator functionfunctionnull
activeClassThe active-class applied to children when they are activated.String'item--active'

Samples Component

image

Samples Qjson

radioGroupGetValues