command-menu.tsx — ui Source File
Architecture documentation for command-menu.tsx, a tsx file in the ui codebase. 20 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR f230e63c_c621_4fb0_5506_e74b21915cf5["command-menu.tsx"] 1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"] f230e63c_c621_4fb0_5506_e74b21915cf5 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2 f5b0b1d9_de2f_9c31_0bcd_4adbd07581cb["navigation"] f230e63c_c621_4fb0_5506_e74b21915cf5 --> f5b0b1d9_de2f_9c31_0bcd_4adbd07581cb 39a0d62e_8e7d_d097_eb95_91d2bca361f7["icons-react"] f230e63c_c621_4fb0_5506_e74b21915cf5 --> 39a0d62e_8e7d_d097_eb95_91d2bca361f7 ed87f24c_8976_ef72_9340_57169d692a6b["client"] f230e63c_c621_4fb0_5506_e74b21915cf5 --> ed87f24c_8976_ef72_9340_57169d692a6b d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"] f230e63c_c621_4fb0_5506_e74b21915cf5 --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3 9c463da6_747b_38dc_586b_cbb4873070b1["radix-ui"] f230e63c_c621_4fb0_5506_e74b21915cf5 --> 9c463da6_747b_38dc_586b_cbb4873070b1 5281a958_99ee_42f0_65d8_3fb6d850517a["colors"] f230e63c_c621_4fb0_5506_e74b21915cf5 --> 5281a958_99ee_42f0_65d8_3fb6d850517a a9903b11_2f1d_8437_2ec7_acd8ba077fa8["events"] f230e63c_c621_4fb0_5506_e74b21915cf5 --> a9903b11_2f1d_8437_2ec7_acd8ba077fa8 0b91b178_fd79_28c3_eac6_9b444a138149["flags"] f230e63c_c621_4fb0_5506_e74b21915cf5 --> 0b91b178_fd79_28c3_eac6_9b444a138149 858e60a8_4233_8866_a501_707e973859f9["page-tree"] f230e63c_c621_4fb0_5506_e74b21915cf5 --> 858e60a8_4233_8866_a501_707e973859f9 b5f7acc2_8550_f8f0_0425_a71c6d434acd["source"] f230e63c_c621_4fb0_5506_e74b21915cf5 --> b5f7acc2_8550_f8f0_0425_a71c6d434acd 79081a1f_55a3_945a_fb8c_d53d6d3eab81["utils"] f230e63c_c621_4fb0_5506_e74b21915cf5 --> 79081a1f_55a3_945a_fb8c_d53d6d3eab81 8c6845ea_e0db_55db_4a65_df2f64d9e581["use-config"] f230e63c_c621_4fb0_5506_e74b21915cf5 --> 8c6845ea_e0db_55db_4a65_df2f64d9e581 9314e41b_b7ea_95cf_6b0c_62b297b3ebf4["use-mutation-observer"] f230e63c_c621_4fb0_5506_e74b21915cf5 --> 9314e41b_b7ea_95cf_6b0c_62b297b3ebf4 style f230e63c_c621_4fb0_5506_e74b21915cf5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import * as React from "react"
import { usePathname, useRouter } from "next/navigation"
import { IconArrowRight } from "@tabler/icons-react"
import { useDocsSearch } from "fumadocs-core/search/client"
import { CornerDownLeftIcon, SquareDashedIcon } from "lucide-react"
import { Dialog as DialogPrimitive } from "radix-ui"
import { type Color, type ColorPalette } from "@/lib/colors"
import { trackEvent } from "@/lib/events"
import { showMcpDocs } from "@/lib/flags"
import { getCurrentBase, getPagesFromFolder } from "@/lib/page-tree"
import { type source } from "@/lib/source"
import { cn } from "@/lib/utils"
import { useConfig } from "@/hooks/use-config"
import { useMutationObserver } from "@/hooks/use-mutation-observer"
import { copyToClipboardWithMeta } from "@/components/copy-button"
import { Button } from "@/registry/new-york-v4/ui/button"
import {
Command,
CommandEmpty,
CommandGroup,
CommandInput,
CommandItem,
CommandList,
} from "@/registry/new-york-v4/ui/command"
import {
Dialog,
DialogDescription,
DialogHeader,
DialogOverlay,
DialogPortal,
DialogTitle,
DialogTrigger,
} from "@/registry/new-york-v4/ui/dialog"
import { Separator } from "@/registry/new-york-v4/ui/separator"
import { Spinner } from "@/registry/new-york-v4/ui/spinner"
export function CommandMenu({
tree,
colors,
blocks,
navItems,
...props
}: React.ComponentProps<typeof Dialog> & {
tree: typeof source.pageTree
colors: ColorPalette[]
blocks?: { name: string; description: string; categories: string[] }[]
navItems?: { href: string; label: string }[]
}) {
const router = useRouter()
const pathname = usePathname()
const [config] = useConfig()
const currentBase = getCurrentBase(pathname)
const [open, setOpen] = React.useState(false)
const [renderDelayedGroups, setRenderDelayedGroups] = React.useState(false)
const [selectedType, setSelectedType] = React.useState<
"color" | "page" | "component" | "block" | null
>(null)
// ... (545 more lines)
Domain
Subdomains
Types
Dependencies
- button
- client
- colors
- command
- copy-button
- dialog
- events
- flags
- icons-react
- lucide-react
- navigation
- page-tree
- radix-ui
- react
- separator
- source
- spinner
- use-config
- use-mutation-observer
- utils
Source
Frequently Asked Questions
What does command-menu.tsx do?
command-menu.tsx is a source file in the ui codebase, written in tsx. It belongs to the Internationalization domain, Dictionary subdomain.
What functions are defined in command-menu.tsx?
command-menu.tsx defines 5 function(s): CommandMenu, CommandMenuItem, CommandMenuKbd, DialogContent, SearchResults.
What does command-menu.tsx depend on?
command-menu.tsx imports 20 module(s): button, client, colors, command, copy-button, dialog, events, flags, and 12 more.
Where is command-menu.tsx in the architecture?
command-menu.tsx is located at apps/v4/components/command-menu.tsx (domain: Internationalization, subdomain: Dictionary, directory: apps/v4/components).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free