RadioButton is an extension to standard radio button element with theming.
Two-way value binding is defined using v-model.
RadioButtons can be generated using a list of values.
Specify the variant property as filled to display the component with a higher visual emphasis than the default outlined style.
Invalid state is displayed using the invalid prop to indicate a failed validation. You can use this style when integrating with form validation libraries.
When disabled is present, the element cannot be edited and focused.
RadioButton component uses a hidden native radio button element internally that is only visible to screen readers. Value to describe the component can either be provided via label tag combined with id prop or using aria-labelledby, aria-label props.
Key | Function |
---|---|
tab | Moves focus to the checked radio button, if there is none within the group then first radio button receives the focus. |
left arrowup arrow | Moves focus to the previous radio button, if there is none then last radio button receives the focus. |
right arrowdown arrow | Moves focus to the next radio button, if there is none then first radio button receives the focus. |
space | If the focused radio button is unchecked, changes the state to checked. |