Installation
Usage
Component Code
Examples
- Basic
- With Label
- Disabled
- With Form
A basic checkbox.
States
The Checkbox component supports the following states:- Unchecked - Default state
- Checked - When the checkbox is selected
- Indeterminate - For partial selection (e.g., select all)
- Disabled - When the checkbox cannot be interacted with
Accessibility
The Checkbox component:- Uses native checkbox semantics
- Supports keyboard navigation
- Works with screen readers
- Implements proper ARIA attributes
- Can be controlled or uncontrolled
API Reference
Checkbox
| Prop | Type | Default |
|---|---|---|
checked | boolean | "indeterminate" | - |
defaultChecked | boolean | - |
onCheckedChange | (checked: boolean) => void | - |
disabled | boolean | false |
required | boolean | false |
name | string | - |
value | string | - |
className | string | - |