8.4k

Checkbox

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

API Reference

Installation

pnpm dlx shadcn@latest add https://coss.com/ui/r/checkbox.json

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.

Disabled

With Description

Card Style

Form Integration

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

Comparing with Radix / shadcn

If you’re already familiar with Radix UI and shadcn/ui, this guide highlights the small differences and similarities so you can get started with coss.com ui quickly.

Quick Checklist

  • If you used asChild on parts, switch to the render prop

coss.com ui

Built by and for the team of Cal.com, Inc. — the leading commercial open source company (“coss”).