Checkbox

A checkbox component that supports custom icons, labels, and various states. It can be used as a controlled or uncontrolled component.

Source

Props

NameDefaultType
labelstring
Text label for the checkbox
disabledfalseboolean
Disables the checkbox
checkedboolean
Controls the checked state (for controlled usage)
accentfalseboolean
Uses accent color for the checkbox

Events

NamePayloadDescription
changebooleanEmitted when the checkbox state changes

Slots

NameAcceptsDescription
defaultanyContent to be displayed as the label (overrides the label prop if provided)
icon-on'ph:check-square-fill'Slot which renders when the component is checked
icon-off'ph:square'Slot which renders when the component is not checked

Tokens

CSS variable tokens used for global or per-instance manipulation of certain styling.

TokenDefaultDescription
--vui-checkbox-size24pxCheckbox width and height