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

Receive updates about new products and features

States

Different checkbox states

Multiple Options

Group of related checkboxes

API Reference

PropTypeDefaultDescription
labelstringLabel text displayed next to the checkbox
descriptionstringAdditional description text below the label
checkedbooleanControlled checked state
defaultCheckedbooleanfalseInitial checked state (uncontrolled)
disabledbooleanfalseWhether the checkbox is disabled
onChange(e: ChangeEvent) => voidHandler called when checked state changes

Related Components