Checkbox

A control allowing the user to toggle between checked and not checked.

API Reference

Installation

pnpm dlx cnippet@latest add checkbox

Usage

import { Checkbox } from "@/components/ui/checkbox"
<Checkbox />

Examples

For accessible labelling and validation, prefer using the Field component to wrap checkboxes. See the related example: Checkbox field.

With Description

Card Style

Form Integration

Field provides accessible labelling and validation primitives for form controls. Use it with Form to submit values.