Checkbox

Forms

A 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

States

Different checkbox states

Multiple Options

Group of related checkboxes

API Reference

label
string

Label text displayed next to the checkbox

description
string

Additional description text below the label

checked
boolean

Controlled checked state

defaultCheckedfalse
boolean

Initial checked state (uncontrolled)

disabledfalse
boolean

Whether the checkbox is disabled

onChange
(e: ChangeEvent) => void

Handler called when checked state changes