Components
Checkbox
Boolean toggle with label, description, indeterminate state, and error messaging.
Import
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | Visible label text |
description | string | — | Secondary text below label |
indeterminate | boolean | false | Partial selection state |
error | string | boolean | — | Error message or error flag |
className | string | — | Additional CSS classes on wrapper |
...rest | InputHTMLAttributes | — | All native checkbox attributes (checked, onChange, disabled, etc.) |
Controlled
Indeterminate state
Used to represent partial selection in a select-all pattern:
With error
Accessibility
- Renders as native
<input type="checkbox"> indeterminatemanaged viauseEffecton the DOM node- Error message associated via
aria-describedbyandrole="alert" aria-invalid="true"when error is set- Disabled state prevents
onChangefrom firing