Radio
VRadio selects one value from a set of options. Share the same name and v-model across the group for native selection and arrow navigation.
Usage
Examples
Hint
Use label or the default slot for the name. hint adds help text linked through aria-describedby.
Three to five working days.
Next working day, when ordered before noon.
Label position
labelPosition="start" places the label before the radio button.
Full width
spread fills the available width and places the label and radio button at opposite ends.
Read-only
Set readonly on every option to keep the selection unchanged while arrows move focus. Use a named wrapper with role="radiogroup" and aria-readonly="true" to announce the state. A read-only group with required and no selection still fails native form validation.
Disabled
disabled prevents selection and removes the option from keyboard navigation and form submission.
API
Props
| Prop | Type | Default |
|---|---|---|
value | ItemValue | none |
String or number assigned to v-model when selected. Use a distinct value for each option. | ||
label | string | none |
Visible label, replaced by the default slot. Without either, provide aria-label or aria-labelledby. | ||
hint | string | none |
Help text below the label, linked through aria-describedby. | ||
error | string | none |
Error message shown in place of the hint. Sets aria-invalid, is linked through aria-describedby and is announced when it appears. | ||
labelPosition | RadioLabelPosition'start' | 'end' | 'end' |
Label before the radio button with start, or after it with end. | ||
spread | boolean | false |
| Fills the available width and separates the label and radio button. | ||
invalid | boolean | false |
Sets aria-invalid and the error style. Does not block form submission by itself. | ||
disabled | boolean | false |
| Disables this option and excludes it from keyboard navigation and form submission. | ||
readonly | boolean | false |
| Prevents selection changes while preserving focus and native form behavior. Set on every option. Announce read-only state on the group wrapper. | ||
v-model | ItemValue | '' |
Selected value, shared by the group. An option is selected when the model matches its value. Defaults to an empty string. | ||
Slots
| Slot | Type |
|---|---|
default | {} |
Clickable label content, replacing label. | |
Types
Types used in the API tables. Import exported types from vectis-ui.
export type ItemValue = string | number
CSS variables
| Token | Value |
|---|---|
--vectis-control-size-check | 1.25rem |
--vectis-control-size-check-dot | 0.5rem |