Checkbox
FormsA checkbox input for selecting one or more options from a list. Use checkboxes when users can select multiple items independently.
Import
import { Checkbox } from "@/components/ui/checkbox";Usage
Basic Checkbox
Standard checkbox with label
With Description
Checkbox with additional helper text
Receive updates about new products and features
States
Different checkbox states
Multiple Options
Group of related checkboxes
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | Label text displayed next to the checkbox |
description | string | — | Additional description text below the label |
checked | boolean | — | Controlled checked state |
defaultChecked | boolean | false | Initial checked state (uncontrolled) |
disabled | boolean | false | Whether the checkbox is disabled |
onChange | (e: ChangeEvent) => void | — | Handler called when checked state changes |