Checkbox

PreviousNext

A control that allows users to toggle between checked and unchecked states with support for indeterminate state, built with React Aria Components.

Component checkbox-demo not found in registry.

Installation

pnpm dlx shadcn@latest add checkbox

Usage

import * as Checkbox from "@/components/ui/checkbox"
 
export default function CheckboxDemo() {
  return (
    <Checkbox.Root>
      <span className="text-sm font-medium">Accept terms and conditions</span>
    </Checkbox.Root>
  )
}

Examples

States

Component checkbox-states not found in registry.

With Text

Component checkbox-with-text not found in registry.

Controlled

Component checkbox-controlled not found in registry.

Group

Component checkbox-group not found in registry.