Skip to content

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

NameTypeDefaultDescription
checkedboolean | ArrayfalseWhether the checkbox is currently checked based on the current value. Either defined by a boolean, or whether `checked` as an array includes `value`.
disabledbooleanfalseWhether the checkbox is disabled.
errorIdundefined
errorTextstring '' Error text to display. Replaces `hintText` (if provided) and adds error styling (overrides `hasError`).
hasErrorbooleanfalseWhether the checkbox is in an error state (optional). For error styling without error text.
hintTextstring '' Displays text below the input; hidden when the isReadOnly prop is truthy.
idstringundefinedUnique ID for the checkbox, required for accessibility purposes
labelstringundefinedLabel text to display with checkbox
modelValueboolean | Arrayundefined
valuestring | numberundefinedThe value of the checkbox.

Slots

NameDescription
default
hintfor displaying hint text

Events

NameDescription
update:checked