Skip to content

Checkbox ​

Checkbox toggles a boolean. Checked and mixed states use brand fill with a dark check or minus.

Demos ​

Basic

Bind checked and listen for change with e.detail.checked.
I agree

Size

Size enum matches Button and Input: sm, md, lg.
SmallMediumLarge

Disabled

disabled blocks toggling.
OffOn

Indeterminate

indeterminate sets aria-checked="mixed" and shows a minus. Clicking checks the box and clears mixed.
Select all

Group

gk-checkbox-group emits change with e.detail.value as string[]. Child checkbox events are stopped so Vue bindings on the group stay correct.
ApplePearPlum

pear

API ​

Checkbox Props ​

PropTypeDefault
checkedbooleanfalse
indeterminatebooleanfalse
disabledbooleanfalse
size'sm' | 'md' | 'lg''md'
valuestring''

Checkbox Events ​

NameDescription
changeUser toggled; detail: { checked: boolean }

CheckboxGroup Props ​

PropTypeDefault
valuestring[][]
disabledbooleanfalse
size'sm' | 'md' | 'lg''md'

CheckboxGroup Events ​

NameDescription
changedetail: { value: string[] }