Home / Function/ Checkbox() — ui Function Reference

Checkbox() — ui Function Reference

Architecture documentation for the Checkbox() function in checkbox.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  555cbb78_a389_0f86_e267_e2b6719eb91c["Checkbox()"]
  814d1708_d1fc_f89f_da71_e1a37a197fa8["checkbox.tsx"]
  555cbb78_a389_0f86_e267_e2b6719eb91c -->|defined in| 814d1708_d1fc_f89f_da71_e1a37a197fa8
  style 555cbb78_a389_0f86_e267_e2b6719eb91c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

deprecated/www/registry/default/ui/checkbox.tsx lines 12–27

>(({ className, ...props }, ref) => (
  <CheckboxPrimitive.Root
    ref={ref}
    className={cn(
      "grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
      className
    )}
    {...props}
  >
    <CheckboxPrimitive.Indicator
      className={cn("grid place-content-center text-current")}
    >
      <Check className="h-4 w-4" />
    </CheckboxPrimitive.Indicator>
  </CheckboxPrimitive.Root>
))

Subdomains

Frequently Asked Questions

What does Checkbox() do?
Checkbox() is a function in the ui codebase, defined in deprecated/www/registry/default/ui/checkbox.tsx.
Where is Checkbox() defined?
Checkbox() is defined in deprecated/www/registry/default/ui/checkbox.tsx at line 12.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free