Checkbox
stableA control that allows the user to toggle between checked, not checked, and indeterminate.
Basic usage
Examples
Indeterminate state
Use the indeterminate state for a "select all" parent checkbox.
Checked, unchecked and indeterminate
Checkbox supports standard and indeterminate states for bulk selection flows.
Semantic colors
Use the color prop to visually reinforce the meaning of each checkbox option.
Features
- Supports indeterminate state.
- Full keyboard navigation.
- Can be controlled or uncontrolled.
Installation
bash
pnpm dlx structyl add checkboxAPI Reference
Checkbox API reference
Full props, types, defaults, and all 2 parts.
Keyboard interactions
Adheres to the WAI-ARIA design pattern .
| Key | Description |
|---|---|
| Space | Toggles the checkbox. |