checkbox

Checkbox

Lets the user tick an option on or off, with an indeterminate state drawn as a minus and a hit area wider than the box.

Parts

PartFileDoes
CheckboxCheckbox.vueLets the user switch an option on or off.

Styling

All of Checkbox’s styles live in checkbox.json. New to styling in Frontic UI? How styling works →

Install

npm packages
@lucide/vue
@vueuse/core
reka-ui

API reference

Checkbox.vue

Lets the user switch an option on or off. Renders a <button>.

Props 12

PropTypeDefault
defaultValueboolean | 'indeterminate'—
modelValueboolean | 'indeterminate' | null—
disabledbooleanfalse
valueAcceptableValue'on'
idstring—
trueValueboolean—
falseValueboolean—
asChildbooleanfalse
asAsTag | Component'button'
namestring—
requiredbooleanfalse
classClassValue—

Events 1

EventPayload
update:modelValuevalue: boolean | "indeterminate"

Slots 1

SlotSlot props
default{ modelValue: boolean | "indeterminate"; state: CheckedState; }

Data attributes 2

Data attributeValues
data-disabled—
data-state'checked' | 'unchecked' | 'indeterminate'

Recipe checkbox 4 groups

Checkbox
State