Checkbox
Basic checkbox
Disabled
Pass the disabled
attribute to the checkbox element to control whether it is disabled
indeterminate
The indeterminate
attribute is used to indicate the uncertain state of the checkbox, generally used for the all-select effect.
Checkbox group
Use the built-in checkbox group element checkbox-group
to group multiple checkboxes together to control checking.
Attributes
checkbox
Attribute | Description | Type | Accepted values | Default |
text | Checkbox description text | string | | |
fontSize | Checkbox text fontsize | number | | The font size set by default for the canvas drawing context object |
checked | Is the checkbox checked? | boolean | | false |
disabled | Whether the checkbox is disabled | boolean | | false |
indeterminate | Set indeterminate state | boolean | | false |
value | checkbox value | any | | |
checkbox-group
Attribute | Description | Type | Accepted values | Default |
value | Checkbox group value | Array | | [] |
Events
checkbox
Event Name | Description | Parameters |
change | Event triggered when a checkbox is checked | (value, checked) |
checkbox-group
Event Name | Description | Parameters |
change | Event triggered when the value of a checkbox group changes | (value) |