For the complete documentation index, see llms.txt. Markdown variants are available by appending .md to any URL or sending an Accept: text/markdown header. An agent skill is available at /.well-known/agent-skills/site-skill.md.
0
Sponsor

Checkbox

A control that allows the user to toggle between checked and not checked.

import { Checkbox } from "@/components/checkbox/checkbox";

export function CheckboxDemo() {
  return (
    <label style={{ alignItems: "center", display: "flex", gap: 8 }}>
      <Checkbox defaultChecked />

Installation

$ pnpm dlx shadcn@latest add https://shadcn-cssinjs.vercel.app/r/checkbox.json

Usage

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

RTL

To enable right-to-left support, see the RTL guide.

"use client";

import { useTranslation } from "@/components/language-selector";
import type { Translations } from "@/components/language-selector";
import { Checkbox } from "@/components/checkbox/checkbox";

API Reference

See the Base UI documentation for the full API.