Skip to content

Checkbox ​

Native checkbox

A real <input type="checkbox"> under a square plate with a drawn tick, wrapped in its label so the whole row is the hit target. v-model is a boolean, or — with value on each box — an array of the checked values. description adds a second line and wires aria-describedby; indeterminate shows the dash for "some of these" (a parent of a group; it's a display state — clicking sets it checked). A box with no visible text needs an aria-label, which passes through to the input.

For a message on an invalid box, put it in a Field; for a set of exclusive choices, RadioGroup; for an on/off setting that takes effect at once rather than a choice submitted with a form, Switch.

Array
picks: [ "eriri" ]
Basic

Usage ​

ts
import { BlessCheckbox } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
idstring—
valuestring | number—
indeterminateboolean—
disabledboolean—
invalidboolean—
descriptionstring—
modelValueboolean | (string | number)[]false

Events

NamePayloadDescription
update:modelValue[value: boolean | (string | number)[]]

Slots

NameScopeDescription
default—

Released under the MIT License. Character names and artwork belong to their owners.