Checkbox
Examples
Basic
Basic usage of checkbox.
Disabled
Disabled checkbox.
Controlled Checkbox
Communicated with other components.
Checkbox Group
Generate a group of checkboxes from an array.
Check all
The indeterminate property can help you to achieve a 'check all' effect.
Checkbox Group With Slot
Instead of using the options attribute you can just provide the checkboxes in the slot
API
Checkbox Attributes
| Property | Description | Type | Default |
|---|---|---|---|
| autoFocus | Set focus when component mounted. | Boolean | false |
| checked | Specifies whether the checkbox is selected. Can be used for 2 way binding. | Boolean | false |
| disabled | Disable checkbox. | Boolean | false |
| indeterminate | Indeterminate checked state of checkbox. | Boolean | false |
CheckboxGroup Attributes
| Property | Description | Type | Default |
|---|---|---|---|
| disabled | Disable all checkboxes. | Boolean | false |
| name | The name property of all input[type="checkbox"] children. | String | - |
| options | Specifies options. | String[] | [{label:"",value:"",disabled:false}] | [] |
| value | Used for setting the currently selected value. | String[] | [] |
Checkbox Events
| Name | Description |
|---|---|
| change | Triggers when the checkbox checked state changes. |
CheckboxGroup Events
| Name | Description |
|---|---|
| change | Triggers when the checkbox group value changes. |
Checkbox Bind
| Name | Description |
|---|---|
| focus | Let's you bind to the input focus method. |
| blur | Let's you bind to the input blur method. |