Components
BaseCheckboxGroup
A group of checkboxes that keeps an array of the selected values.
components/ui/inputs/BaseCheckboxGroup.vue
View in the demo
Example
API
Props
Name | Type | Default | Description |
|---|---|---|---|
itemsrequired | BaseSelectionItem[] | — | The options, each { title, value }. |
inline | boolean | false | Places the options in a row. |
label | string | — | The visible label above the field, linked to it with for and aria-labelledby. |
input-id | string | — | A fixed id for the input. One is generated with useId() when you leave it out. |
optional | boolean | — | Adds “(optional)” after the label. Never mark required fields. |
info | BaseInputInfo | — | A help popover next to the label: a text or a list of { title, text }. |
v-model | BaseSelectionValue[] | [] | The selected values. |
Events
Name | Payload | Description |
|---|---|---|
@update:modelValue | [value: BaseSelectionValue[]] | — |
Accessibility
With a label the group renders a fieldset with a legend, so screen readers announce the question before each option. It accepts rules, hint and error-messages like any field.