Checkbox

A form control that allows users to select one or more options from a set of choices.

Installation

npx chilli@latest add checkbox

Default

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

PropTypeDefaultDescription
labelstringThe label text displayed next to the checkbox.
descriptionstringDescription text displayed below the label.
checkedbooleanfalseControlled checked state.
indeterminatebooleanfalseDisplay an indeterminate (mixed) state.
numbernumberDisplay a number inside the checkbox instead of a check icon.
size"sm" | "md""md"The size of the checkbox.
disabledbooleanfalseWhether the checkbox is disabled.
onCheckedChange(checked: boolean) => voidCallback when the checked state changes.