Forms
Checkbox
A labelled on/off choice, with an optional hint, and checkgroup for a set of related choices under one legend.
import { EcoCheckbox, EcoCheckboxGroup } from "vue-ecosphere"
States
The indeterminate box follows the group below.
With a hint
Group
Value: ["request","owner"]
Group in a row, invalid
One message for the group, not one per box. Check any option to clear it.
Value: []
EcoCheckbox
| Name | Type | Default | Description |
|---|---|---|---|
v-model | boolean | false | Checked state. |
label | string | — | The thing that becomes true when checked. Default slot overrides. |
hint | string | — | Second line (checkbox__h), wired with aria-describedby. |
indeterminate | boolean | false | Set as a property on the input, for a partly checked parent. |
disabled | boolean | false | Say why in the hint. |
invalid | boolean | false | aria-invalid on the box. |
value / name | string | — | Native form attributes. |
EcoCheckboxGroup
| Name | Type | Default | Description |
|---|---|---|---|
v-model | (string | number)[] | [] | The checked values. |
options | EcoOption[] | — | { label, value, hint?, disabled? } |
label / required | — | — | The legend (field__l) and its req mark. |
row | boolean | false | Short options side by side (checkgroup--row). |
hint / error | string | — | One line under the group; the error marks every box invalid. |
disabled / name | — | — | Applied to every box. |