Components
Checkbox
A control that allows the user to toggle between checked and not checked.
Demo
Code
Accept terms and conditions
You agree to our Terms of Service and Privacy Policy.
Installation
Usage
Basic Usage
With Label
With Description
Sizes
Indeterminate State
For "select all" scenarios:
Disabled State
API Reference
Checkbox
| Prop | Type | Default | Description |
|---|---|---|---|
checked | boolean | false | Whether checkbox is checked |
onCheckedChange | (checked: boolean) => void | — | Callback when state changes |
children | ReactNode | — | Label content |
size | 'sm' | 'md' | 'lg' | 'md' | Checkbox size |
disabled | boolean | false | Disable the checkbox |
indeterminate | boolean | false | Show indeterminate state |
className | string | — | Additional classes |
CheckboxLabel
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | Required | Label text |
className | string | — | Additional classes |
CheckboxDescription
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | Required | Description text |
className | string | — | Additional classes |