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. Size
Size enum matches Button and Input:
sm, md, lg. Disabled
disabled blocks toggling. Indeterminate
indeterminate sets aria-checked="mixed" and shows a minus. Clicking checks the box and clears mixed. 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. pear
API
Checkbox Props
| Prop | Type | Default |
|---|---|---|
checked | boolean | false |
indeterminate | boolean | false |
disabled | boolean | false |
size | 'sm' | 'md' | 'lg' | 'md' |
value | string | '' |
Checkbox Events
| Name | Description |
|---|---|
change | User toggled; detail: { checked: boolean } |
CheckboxGroup Props
| Prop | Type | Default |
|---|---|---|
value | string[] | [] |
disabled | boolean | false |
size | 'sm' | 'md' | 'lg' | 'md' |
CheckboxGroup Events
| Name | Description |
|---|---|
change | detail: { value: string[] } |