Menu

Checkbox

Multi-select control. 3 values × 4 states.

Installation

$ npx uix-ui@latest add checkbox

This copies the file into components/ui/checkbox.tsx in your project. npx shadcn@latest add @uix/checkbox works too.

Usage

checkbox.tsx
import { Checkbox } from "@/components/ui/checkbox";

<Checkbox label="Send me the weekly tea list" defaultChecked />

Examples

Mixed, nested and disabled

Props

PropTypeDefaultDescription
labelReact.ReactNode–
indeterminatebooleanfalseShows the dash state (mixed selection).

Everything else is passed to the root element, so className, aria-* and event handlers work as usual.

Dependencies

Installed for you by the CLI.

  • class-variance-authority
  • clsx
  • tailwind-merge
  • lib/utils.ts
  • components/ui/icons.tsx
esc

↑↓ to navigate · ↵ to select · esc to close