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 UIPrimitives 6 imports 9 functions

Entity Profile

Dependency Diagram

graph LR
  28611210_7d61_d0c9_2117_f6f1cdf206c1["command.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  28611210_7d61_d0c9_2117_f6f1cdf206c1 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  b0e1f94c_e859_d22e_53c7_b9827ad91d80["cmdk"]
  28611210_7d61_d0c9_2117_f6f1cdf206c1 --> b0e1f94c_e859_d22e_53c7_b9827ad91d80
  8ad666ec_1b20_adda_0392_87a60bdb3a68["utils"]
  28611210_7d61_d0c9_2117_f6f1cdf206c1 --> 8ad666ec_1b20_adda_0392_87a60bdb3a68
  bf79f9bb_684a_daf2_047f_c53b74f509e8["dialog"]
  28611210_7d61_d0c9_2117_f6f1cdf206c1 --> bf79f9bb_684a_daf2_047f_c53b74f509e8
  1fc17a46_59d6_3716_6581_5cf015f0af50["input-group"]
  28611210_7d61_d0c9_2117_f6f1cdf206c1 --> 1fc17a46_59d6_3716_6581_5cf015f0af50
  de6fac54_74ca_6c25_8f8b_d1ba3287dbf2["icon-placeholder"]
  28611210_7d61_d0c9_2117_f6f1cdf206c1 --> de6fac54_74ca_6c25_8f8b_d1ba3287dbf2
  style 28611210_7d61_d0c9_2117_f6f1cdf206c1 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/base/lib/utils"
import {
  Dialog,
  DialogContent,
  DialogDescription,
  DialogHeader,
  DialogTitle,
} from "@/registry/bases/base/ui/dialog"
import {
  InputGroup,
  InputGroupAddon,
} from "@/registry/bases/base/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
}: Omit<React.ComponentProps<typeof Dialog>, "children"> & {
  title?: string
  description?: string
  className?: string
  showCloseButton?: boolean
  children: React.ReactNode
}) {
  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
        )}
// ... (145 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, UIPrimitives 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/base/ui/command.tsx (domain: ComponentRegistry, subdomain: UIPrimitives, directory: apps/v4/registry/bases/base/ui).

Analyze Your Own Codebase

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

Try Supermodel Free