Checkbox
Choose zero, one or many options. Also for a single consent.
Usage
import { Checkbox } from '@smartui/react';
import '@smartui/react/styles.css';When to use
- Choosing several options.
- A parent "select all" with the indeterminate state.
When not to use
- Exactly one option. Use Radio.
- A setting that applies immediately. Use Switch.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
isSelected, defaultSelected, onChange | boolean, boolean, (v) => void | - | |
isIndeterminate | boolean | false | |
size | 'md' | 'lg' | 'md' | |
isInvalid, isDisabled | boolean | false |
Accessibility
- The whole row is one target. Space toggles it.