Option List #
The va-option-list
component is a component to be used to group form inputs (like checkboxes and radio buttons) into a list for better control over the data.
Examples #
Default #
By default va-option-list
will render list of checkboxes provided by options
prop
Radio #
Set type="radio"
to display list radio buttons
Switch #
Set type="switch"
to display list switches
Array of objects #
Instead of array of strings you can provide array of objects and specify which key is for each setting.
[ "Alternative value 1" ]
API #
Props #
Name | Description | Types | Default |
---|---|---|---|
color |
|
| |
defaultValue |
| - | |
disabled |
|
| |
disabledBy |
|
| |
error |
| - | |
errorCount |
|
| |
errorMessages |
| - | |
groupBy |
|
| |
immediateValidation |
|
| |
leftLabel |
|
| |
messages |
|
| |
modelValue |
| - | |
name |
|
| |
options |
|
| |
preset |
| - | |
readonly |
|
| |
rules |
|
| |
stateful |
|
| |
success |
|
| |
textBy |
|
| |
trackBy |
|
| |
type |
|
| |
valueBy |
|
|
Events #
Name | Description |
---|---|
clear | |
update:modelValue | The event is triggered when the component needs to change the model. Is also used by |
Slots #
Name | Description |
---|---|
default | Used to render items. Available props are:
|
Css Variables #
Name | Default Value |
---|---|
--va-option-list-line-height | 1.5 |