command.tsx — ui Source File
Architecture documentation for command.tsx, a tsx file in the ui codebase. 6 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR ba6c0424_1e33_efc2_5b1d_83fec08894aa["command.tsx"] 1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"] ba6c0424_1e33_efc2_5b1d_83fec08894aa --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2 ebff4254_a5ce_f52c_8b1c_5635efd1973d["react-dialog"] ba6c0424_1e33_efc2_5b1d_83fec08894aa --> ebff4254_a5ce_f52c_8b1c_5635efd1973d b0e1f94c_e859_d22e_53c7_b9827ad91d80["cmdk"] ba6c0424_1e33_efc2_5b1d_83fec08894aa --> b0e1f94c_e859_d22e_53c7_b9827ad91d80 d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"] ba6c0424_1e33_efc2_5b1d_83fec08894aa --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3 79081a1f_55a3_945a_fb8c_d53d6d3eab81["utils"] ba6c0424_1e33_efc2_5b1d_83fec08894aa --> 79081a1f_55a3_945a_fb8c_d53d6d3eab81 885f582a_05b5_deff_0779_e9bfb6fad47b["dialog"] ba6c0424_1e33_efc2_5b1d_83fec08894aa --> 885f582a_05b5_deff_0779_e9bfb6fad47b style ba6c0424_1e33_efc2_5b1d_83fec08894aa fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import * as React from "react"
import { type DialogProps } from "@radix-ui/react-dialog"
import { Command as CommandPrimitive } from "cmdk"
import { Search } from "lucide-react"
import { cn } from "@/lib/utils"
import { Dialog, DialogContent } from "@/registry/default/ui/dialog"
const Command = React.forwardRef<
React.ElementRef<typeof CommandPrimitive>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive>
>(({ className, ...props }, ref) => (
<CommandPrimitive
ref={ref}
className={cn(
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
className
)}
{...props}
/>
))
Command.displayName = CommandPrimitive.displayName
const CommandDialog = ({ children, ...props }: DialogProps) => {
return (
<Dialog {...props}>
<DialogContent className="overflow-hidden p-0 shadow-lg">
<Command className="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[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>
)
}
const CommandInput = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Input>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>
>(({ className, ...props }, ref) => (
<div className="flex items-center border-b px-3" cmdk-input-wrapper="">
<Search className="mr-2 h-4 w-4 shrink-0 opacity-50" />
<CommandPrimitive.Input
ref={ref}
className={cn(
"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
className
)}
{...props}
/>
</div>
))
CommandInput.displayName = CommandPrimitive.Input.displayName
const CommandList = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.List>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>
>(({ className, ...props }, ref) => (
// ... (94 more lines)
Domain
Subdomains
Functions
Dependencies
- cmdk
- dialog
- lucide-react
- react
- react-dialog
- utils
Source
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 6 module(s): cmdk, dialog, lucide-react, react, react-dialog, utils.
Where is command.tsx in the architecture?
command.tsx is located at deprecated/www/registry/default/ui/command.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