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
  f9a63efd_ca65_a19c_ee18_0c2b368a3d2a["checkbox.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  f9a63efd_ca65_a19c_ee18_0c2b368a3d2a --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"]
  f9a63efd_ca65_a19c_ee18_0c2b368a3d2a --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3
  9c463da6_747b_38dc_586b_cbb4873070b1["radix-ui"]
  f9a63efd_ca65_a19c_ee18_0c2b368a3d2a --> 9c463da6_747b_38dc_586b_cbb4873070b1
  79081a1f_55a3_945a_fb8c_d53d6d3eab81["utils"]
  f9a63efd_ca65_a19c_ee18_0c2b368a3d2a --> 79081a1f_55a3_945a_fb8c_d53d6d3eab81
  style f9a63efd_ca65_a19c_ee18_0c2b368a3d2a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"
import { CheckIcon } from "lucide-react"
import { Checkbox as CheckboxPrimitive } from "radix-ui"

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

function Checkbox({
  className,
  ...props
}: React.ComponentProps<typeof CheckboxPrimitive.Root>) {
  return (
    <CheckboxPrimitive.Root
      data-slot="checkbox"
      className={cn(
        "peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
        className
      )}
      {...props}
    >
      <CheckboxPrimitive.Indicator
        data-slot="checkbox-indicator"
        className="grid place-content-center text-current transition-none"
      >
        <CheckIcon className="size-3.5" />
      </CheckboxPrimitive.Indicator>
    </CheckboxPrimitive.Root>
  )
}

export { Checkbox }

Subdomains

Functions

Dependencies

  • lucide-react
  • radix-ui
  • react
  • 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, radix-ui, react, utils.
Where is checkbox.tsx in the architecture?
checkbox.tsx is located at apps/v4/registry/new-york-v4/ui/checkbox.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: apps/v4/registry/new-york-v4/ui).

Analyze Your Own Codebase

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

Try Supermodel Free