Home / Function/ CommandDialog() — ui Function Reference

CommandDialog() — ui Function Reference

Architecture documentation for the CommandDialog() function in command.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  b02db0a2_3a6c_bacf_9692_9081c3931606["CommandDialog()"]
  22fc48d0_3cb2_ec62_5e39_bb16c64c048e["command.tsx"]
  b02db0a2_3a6c_bacf_9692_9081c3931606 -->|defined in| 22fc48d0_3cb2_ec62_5e39_bb16c64c048e
  style b02db0a2_3a6c_bacf_9692_9081c3931606 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/registry/bases/radix/ui/command.tsx lines 36–66

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}
      >
        {children}
      </DialogContent>
    </Dialog>
  )
}

Subdomains

Frequently Asked Questions

What does CommandDialog() do?
CommandDialog() is a function in the ui codebase, defined in apps/v4/registry/bases/radix/ui/command.tsx.
Where is CommandDialog() defined?
CommandDialog() is defined in apps/v4/registry/bases/radix/ui/command.tsx at line 36.

Analyze Your Own Codebase

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

Try Supermodel Free