Checkbox
A control that allows the user to toggle between checked and not checked.
Preview
Installation
Use the CLI to add this component to your project.
Usage
tsx
10 linesCopy
Examples
With Text
You agree to our Terms of Service and Privacy Policy.
Disabled
Checkbox Group
On Success Color
Blue
Red
Green
Purple
Orange
Props
| Prop | Type | Default | Description |
|---|---|---|---|
checked | boolean | Controlled checked state | |
onSuccessColor | 'red' | 'blue' | 'green' | 'purple' | 'orange' | 'default' | default | Color of the checkbox |
defaultChecked | boolean | true | Default checked state |
onCheckedChange | (checked: boolean) => void | Called when checked state changes | |
disabled | boolean | false | Disable the checkbox |