Radio
Vue Bootstrap 5 Radio
Vue Radio Button is a component used to allow a user to make a single choice among a number of options (whereas Checkboxes are used for selecting multiple options).
Disabled
Add the disabled
attribute and the associated <label>
s are
automatically styled to match with a lighter color to help indicate the input’s state.
Inline
Group checkboxes or radios on the same horizontal row by adding
inline
property to any MDBRadio
.
Without labels
Omit the wrapping .form-check
for checkboxes and radios that have no label text
by adding :formCheck="false"
. Remember to still provide some form of label for
assistive technologies (for instance, using aria-label
).
Radio - API
Import
Properties
Property | Type | Default | Description |
---|---|---|---|
label
|
String | "" |
Changes input label |
wrapperClass
|
String | "" |
Changes input wrapper classes |
labelClass
|
String | "" |
Changes input label classes |
inline
|
Boolean | false |
Enables inline mode |
btnCheck
|
Boolean | false |
Enables btn mode |
wrap
|
Boolean | true |
Enables div.form-check wrapper |
formCheck
|
Boolean | true |
Enables wrapper .formCheck class |
tag
|
String | "div" |
Changes input wrapper tag |
value
|
String | "" |
Sets radio value |
v-model
|
String | "" |
Changes input value with two-way data binding |
required
|
Boolean | "" |
Adds required attribute to input element |
validateOnChange
|
Boolean |
|
Add validation on change event to element |
isValidated |
Boolean | false |
Marks element as validated. |
isValid
|
Boolean | "" |
Sets element as valid or invalid |
validFeedback
|
String | "" |
Sets valid status feedback for validated element |
invalidFeedback
|
String | "" |
Sets invalid status feedback for validated element |
tooltipFeedback
|
Boolean | false |
Display validation feedback in a styled tooltip |