Checkbox
Introduction
A checkbox is a common form component used to select multiple items from a group of options.

Configuration items
Category |
Configuration |
Example |
Description |
Content |
Option list |
Configure options manually or by mapping. To configure manually, set each `currentItem` directly. To configure by mapping, set a data source array. Each `currentItem` includes `label`, `value`, and `disabled` properties. |
|
Default value |
The default selected option. |
||
Label |
The form label. For more information, see Common form properties. |
||
Interaction |
Hide |
Hides the component. For more information, see Common properties. |
|
Disable |
Disables the component. |
||
Validation |
Form validation. For more information, see Common form properties. |
||
Style |
Margin |
The margin. For more information, see Common properties. |
|
Group layout |
The group layout. `Single column` displays only one option per row. The default behavior is to wrap options to the next line. |
||
CSS style |
Selected color |
The color of the selected option. |
|
Hover color |
The color of the selected option on hover. |
||
Text color |
The color of the text. |
||
Label font size |
The font size of the label. |
Properties and methods
Name |
Type |
Example |
Description |
value |
string |
|
The selected option of the component. |
labelText |
string |
|
The label text of the component. |
disabled |
boolean |
|
Indicates whether the component is disabled. |
data |
array |
|
The data of the checkbox component. |
validationStatus |
boolean |
|
The validation status of the component. |
validationMessage |
string |
|
The validation message of the component. |
blur |
func |
|
The component loses focus. |
focus |
func |
|
The component gains focus. |
validate |
func |
|
Validates the component. |
setValue |
func |
|
Sets the content of the component. |
setDisabled |
func |
|
Sets the disabled state of the component. |
clearValue |
func |
|
Clears the `value` of the component. |
clearValidate |
func |
|
Clears the validation information of the component. |
clearDisabled |
func |
|
Clears the disabled state of the component. |
Event callbacks
Property |
Description |
The event that is triggered when the value of the input box changes. |