Checkbox
A checkbox is a component that lets the user select the value that is written in its corresponding text label. A user can select multiple checkboxes from a group at the same time.
install | yarn add @clayui/form |
---|---|
version | 3.122.0 |
Stable3.122.0View in LexiconCHANGELOG
Use checked
property to check or not the checkbox.
To set a callback function when the value of the checkbox is changed, use onChange
property. See the following example:
Here you can see some options or ideas on how to extend our Checkbox component to fit your use:
Container Props
If you want to modify the container that wraps the checkbox, use containerProps
:
Label
Use label
property to describe what the checkbox is for.
Inline
Group checkboxes on the same horizontal row by using inline
property.
Indeterminate
Use indeterminate
property for making the checkbox indeterminate.