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

Entity Profile

Dependency Diagram

graph LR
  a88c7611_bf85_ef88_f0a5_89d7ec1501ca["command.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  a88c7611_bf85_ef88_f0a5_89d7ec1501ca --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  191e4a89_25e4_f7a3_d5fb_d71d101e0990["utils"]
  a88c7611_bf85_ef88_f0a5_89d7ec1501ca --> 191e4a89_25e4_f7a3_d5fb_d71d101e0990
  cd433a12_a20e_c2ab_21fc_4d4945c6d923["dialog"]
  a88c7611_bf85_ef88_f0a5_89d7ec1501ca --> cd433a12_a20e_c2ab_21fc_4d4945c6d923
  d4ae1ebd_39ec_2b17_5c84_fbca1aec26c7["input-group"]
  a88c7611_bf85_ef88_f0a5_89d7ec1501ca --> d4ae1ebd_39ec_2b17_5c84_fbca1aec26c7
  b0e1f94c_e859_d22e_53c7_b9827ad91d80["cmdk"]
  a88c7611_bf85_ef88_f0a5_89d7ec1501ca --> b0e1f94c_e859_d22e_53c7_b9827ad91d80
  d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"]
  a88c7611_bf85_ef88_f0a5_89d7ec1501ca --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3
  style a88c7611_bf85_ef88_f0a5_89d7ec1501ca fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"
import { cn } from "@/examples/radix/lib/utils"
import {
  Dialog,
  DialogContent,
  DialogDescription,
  DialogHeader,
  DialogTitle,
} from "@/examples/radix/ui/dialog"
import { InputGroup, InputGroupAddon } from "@/examples/radix/ui/input-group"
import { Command as CommandPrimitive } from "cmdk"
import { CheckIcon, SearchIcon } from "lucide-react"

function Command({
  className,
  ...props
}: React.ComponentProps<typeof CommandPrimitive>) {
  return (
    <CommandPrimitive
      data-slot="command"
      className={cn(
        "bg-popover text-popover-foreground flex size-full flex-col overflow-hidden rounded-xl! p-1",
        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(
          "top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0",
          className
        )}
        showCloseButton={showCloseButton}
      >
        {children}
      </DialogContent>
    </Dialog>
// ... (132 more lines)

Subdomains

Dependencies

  • cmdk
  • dialog
  • input-group
  • 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 DocumentationAtlas domain, SearchAPI 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, input-group, lucide-react, react, utils.
Where is command.tsx in the architecture?
command.tsx is located at apps/v4/examples/radix/ui/command.tsx (domain: DocumentationAtlas, subdomain: SearchAPI, directory: apps/v4/examples/radix/ui).

Analyze Your Own Codebase

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

Try Supermodel Free