Documentation
Getting Started
Foundations
Form
Layout
Display
Navigation
Overlay
Feedback
Checkbox
Form
A checkbox component that allows users to select multiple options from a list. Includes support for indeterminate state and custom styling.
Installation
bash
1npx @dinachi/cli@latest add checkboxRun the CLI command above to automatically install the component and its dependencies.
Examples
Default Checkbox
A basic checkbox with label
Checkbox States
Different checkbox states including indeterminate
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
checked | boolean | 'indeterminate' | — | The checked state of the checkbox |
defaultChecked | boolean | false | The default checked state |
onCheckedChange | (checked: boolean | 'indeterminate') => void | — | Callback fired when the checked state changes |
disabled | boolean | false | Whether the checkbox is disabled |
required | boolean | false | Whether the checkbox is required |