Checkbox
A form control that allows users to select one or more options from a set of choices.
Installation
npx chilli@latest add checkboxDefault
Sizes
States
With Text
Accept terms and conditionsYou agree to our Terms of Service and Privacy Policy.
Enable notificationsReceive email notifications for new activity.
Disabled optionThis option is not available.
API Reference
Checkbox
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | The label text displayed next to the checkbox. |
description | string | — | Description text displayed below the label. |
checked | boolean | false | Controlled checked state. |
indeterminate | boolean | false | Display an indeterminate (mixed) state. |
number | number | — | Display a number inside the checkbox instead of a check icon. |
size | "sm" | "md" | "md" | The size of the checkbox. |
disabled | boolean | false | Whether the checkbox is disabled. |
onCheckedChange | (checked: boolean) => void | — | Callback when the checked state changes. |