---
title: "Checkbox"
description: "A checkbox with checked, unchecked, and indeterminate states, keyboard support, and form integration. Built on Base UI."
plan: Free
docs: https://ui.edbn.me/docs/components/checkbox
---

# Checkbox

A checkbox with checked, unchecked, and indeterminate states, keyboard support, and form integration. Built on Base UI.

## Installation

```bash
npx shadcn@4.19.0 add https://ui.edbn.me/r/checkbox.json
```

## Dependencies
- npm: @base-ui/react@^1.8.0, lucide-react@^1.33.0
- edbn: edbn-base

## Usage

```tsx examples/checkbox-basic.tsx
"use client";
import { Checkbox } from "@/components/ui/checkbox";
import { Label } from "@/components/ui/label";

export default function CheckboxBasicPreview() {
  return (
    <div className="flex items-center gap-2">
      <Checkbox id="terms" defaultChecked />
      <Label htmlFor="terms">Accept terms</Label>
    </div>
  );
}
```

## Files
- components/ui/checkbox.tsx (31 lines)

## For agents
- Base theme, once per project: npx shadcn@4.19.0 add https://ui.edbn.me/r/edbn-base.json
- MCP server with search, items, examples and source: https://ui.edbn.me/mcp
- Every page and item: https://ui.edbn.me/llms.txt
