Home / File/ command.tsx — ui Source File

command.tsx — ui Source File

Architecture documentation for command.tsx, a tsx file in the ui codebase. 5 imports, 0 dependents.

File tsx ComponentRegistry ChartRegistry 5 imports 9 functions

Entity Profile

Dependency Diagram

graph LR
  7a7173b4_d7f5_0575_733b_2098f08eb77d["command.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  7a7173b4_d7f5_0575_733b_2098f08eb77d --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  b0e1f94c_e859_d22e_53c7_b9827ad91d80["cmdk"]
  7a7173b4_d7f5_0575_733b_2098f08eb77d --> b0e1f94c_e859_d22e_53c7_b9827ad91d80
  d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"]
  7a7173b4_d7f5_0575_733b_2098f08eb77d --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3
  79081a1f_55a3_945a_fb8c_d53d6d3eab81["utils"]
  7a7173b4_d7f5_0575_733b_2098f08eb77d --> 79081a1f_55a3_945a_fb8c_d53d6d3eab81
  0896a8fa_5462_a73a_5add_fb8176921778["dialog"]
  7a7173b4_d7f5_0575_733b_2098f08eb77d --> 0896a8fa_5462_a73a_5add_fb8176921778
  style 7a7173b4_d7f5_0575_733b_2098f08eb77d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"
import { Command as CommandPrimitive } from "cmdk"
import { SearchIcon } from "lucide-react"

import { cn } from "@/lib/utils"
import {
  Dialog,
  DialogContent,
  DialogDescription,
  DialogHeader,
  DialogTitle,
} from "@/registry/new-york-v4/ui/dialog"

function Command({
  className,
  ...props
}: React.ComponentProps<typeof CommandPrimitive>) {
  return (
    <CommandPrimitive
      data-slot="command"
      className={cn(
        "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
        className
      )}
      {...props}
    />
  )
}

function CommandDialog({
  title = "Command Palette",
  description = "Search for a command to run...",
  children,
  className,
  showCloseButton = true,
  ...props
}: React.ComponentProps<typeof Dialog> & {
  title?: string
  description?: string
  className?: string
  showCloseButton?: boolean
}) {
  return (
    <Dialog {...props}>
      <DialogHeader className="sr-only">
        <DialogTitle>{title}</DialogTitle>
        <DialogDescription>{description}</DialogDescription>
      </DialogHeader>
      <DialogContent
        className={cn("overflow-hidden p-0", className)}
        showCloseButton={showCloseButton}
      >
        <Command className="[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
          {children}
        </Command>
      </DialogContent>
    </Dialog>
  )
// ... (125 more lines)

Subdomains

Dependencies

  • cmdk
  • dialog
  • lucide-react
  • react
  • utils

Frequently Asked Questions

What does command.tsx do?
command.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 command.tsx?
command.tsx defines 9 function(s): Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut.
What does command.tsx depend on?
command.tsx imports 5 module(s): cmdk, dialog, lucide-react, react, utils.
Where is command.tsx in the architecture?
command.tsx is located at apps/v4/registry/new-york-v4/ui/command.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