Home / File/ checkbox.tsx — ui Source File

checkbox.tsx — ui Source File

Architecture documentation for checkbox.tsx, a tsx file in the ui codebase. 4 imports, 0 dependents.

File tsx ComponentRegistry ChartRegistry 4 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  814d1708_d1fc_f89f_da71_e1a37a197fa8["checkbox.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  814d1708_d1fc_f89f_da71_e1a37a197fa8 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  26df4fad_662d_85f9_2970_08d30b539838["react-checkbox"]
  814d1708_d1fc_f89f_da71_e1a37a197fa8 --> 26df4fad_662d_85f9_2970_08d30b539838
  d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"]
  814d1708_d1fc_f89f_da71_e1a37a197fa8 --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3
  79081a1f_55a3_945a_fb8c_d53d6d3eab81["utils"]
  814d1708_d1fc_f89f_da71_e1a37a197fa8 --> 79081a1f_55a3_945a_fb8c_d53d6d3eab81
  style 814d1708_d1fc_f89f_da71_e1a37a197fa8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"
import * as CheckboxPrimitive from "@radix-ui/react-checkbox"
import { Check } from "lucide-react"

import { cn } from "@/lib/utils"

const Checkbox = React.forwardRef<
  React.ElementRef<typeof CheckboxPrimitive.Root>,
  React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>
>(({ 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>
))
Checkbox.displayName = CheckboxPrimitive.Root.displayName

export { Checkbox }

Subdomains

Functions

Dependencies

  • lucide-react
  • react
  • react-checkbox
  • utils

Frequently Asked Questions

What does checkbox.tsx do?
checkbox.tsx is a source file in the ui codebase, written in tsx. It belongs to the ComponentRegistry domain, ChartRegistry subdomain.
What functions are defined in checkbox.tsx?
checkbox.tsx defines 1 function(s): Checkbox.
What does checkbox.tsx depend on?
checkbox.tsx imports 4 module(s): lucide-react, react, react-checkbox, utils.
Where is checkbox.tsx in the architecture?
checkbox.tsx is located at deprecated/www/registry/default/ui/checkbox.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: deprecated/www/registry/default/ui).

Analyze Your Own Codebase

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

Try Supermodel Free