Checkbox API
API reference docs for the Stash Checkbox
component. Learn about the props, CSS, and other APIs of this exported module.
Import
ts
import Checkbox from '@leaflink/stash/Checkbox.vue';
Props
Name | Type | Default | Description |
---|---|---|---|
checked | boolean | Array | false | Whether the checkbox is currently checked based on the current value. Either defined by a boolean, or whether `checked` as an array includes `value`. |
disabled | boolean | false | Whether the checkbox is disabled. |
errorId | undefined | ||
errorText | string | '' | Error text to display. Replaces `hintText` (if provided) and adds error styling (overrides `hasError`). |
hasError | boolean | false | Whether the checkbox is in an error state (optional). For error styling without error text. |
hintText | string | '' | Displays text below the input; hidden when the isReadOnly prop is truthy. |
id | string | undefined | Unique ID for the checkbox, required for accessibility purposes |
label | string | undefined | Label text to display with checkbox |
modelValue | boolean | Array | undefined | |
value | string | number | undefined | The value of the checkbox. |
Slots
Name | Description |
---|---|
default | |
hint | for displaying hint text |
Events
Name | Description |
---|---|
update:checked |