Home / File/ command.tsx — ui Source File

command.tsx — ui Source File

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

File tsx ComponentRegistry ChartRegistry 6 imports 9 functions

Entity Profile

Dependency Diagram

graph LR
  22fc48d0_3cb2_ec62_5e39_bb16c64c048e["command.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  22fc48d0_3cb2_ec62_5e39_bb16c64c048e --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  b0e1f94c_e859_d22e_53c7_b9827ad91d80["cmdk"]
  22fc48d0_3cb2_ec62_5e39_bb16c64c048e --> b0e1f94c_e859_d22e_53c7_b9827ad91d80
  ef4051f4_aeb7_8d0c_a726_0ba96ad80cf6["utils"]
  22fc48d0_3cb2_ec62_5e39_bb16c64c048e --> ef4051f4_aeb7_8d0c_a726_0ba96ad80cf6
  ee16c284_c278_b787_3146_67666cbd8485["dialog"]
  22fc48d0_3cb2_ec62_5e39_bb16c64c048e --> ee16c284_c278_b787_3146_67666cbd8485
  0933745b_84d7_328d_17fd_7868edde7274["input-group"]
  22fc48d0_3cb2_ec62_5e39_bb16c64c048e --> 0933745b_84d7_328d_17fd_7868edde7274
  de6fac54_74ca_6c25_8f8b_d1ba3287dbf2["icon-placeholder"]
  22fc48d0_3cb2_ec62_5e39_bb16c64c048e --> de6fac54_74ca_6c25_8f8b_d1ba3287dbf2
  style 22fc48d0_3cb2_ec62_5e39_bb16c64c048e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

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

import { cn } from "@/registry/bases/radix/lib/utils"
import {
  Dialog,
  DialogContent,
  DialogDescription,
  DialogHeader,
  DialogTitle,
} from "@/registry/bases/radix/ui/dialog"
import {
  InputGroup,
  InputGroupAddon,
} from "@/registry/bases/radix/ui/input-group"
import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"

function Command({
  className,
  ...props
}: React.ComponentProps<typeof CommandPrimitive>) {
  return (
    <CommandPrimitive
      data-slot="command"
      className={cn(
        "cn-command flex size-full flex-col overflow-hidden",
        className
      )}
      {...props}
    />
  )
}

function CommandDialog({
  title = "Command Palette",
  description = "Search for a command to run...",
  children,
  className,
  showCloseButton = false,
  ...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(
          "cn-command-dialog top-1/3 translate-y-0 overflow-hidden p-0",
          className
        )}
        showCloseButton={showCloseButton}
// ... (144 more lines)

Subdomains

Dependencies

  • cmdk
  • dialog
  • icon-placeholder
  • input-group
  • 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 6 module(s): cmdk, dialog, icon-placeholder, input-group, react, utils.
Where is command.tsx in the architecture?
command.tsx is located at apps/v4/registry/bases/radix/ui/command.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: apps/v4/registry/bases/radix/ui).

Analyze Your Own Codebase

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

Try Supermodel Free