Checkbox
Lets people select one or more options from a set. Supports an indeterminate state for parent rows whose children are partially selected.
Values
Unchecked, Checked, Indeterminate.
<Checkbox label="Remember me" defaultChecked /> <Checkbox label="Select all" indeterminate />
Disabled
Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | ReactNode | — | Label text. |
indeterminate | boolean | false | Partially-selected parent. |
checked / defaultChecked | boolean | — | Value. |
disabled | boolean | false | Disabled state. |
Usage
Do
- Use for independent on/off choices that are submitted.
- Use indeterminate for partially-selected parents.
Don't
- Use for settings that apply instantly — use Toggle.