Home / Function/ CommandItem() — ui Function Reference

CommandItem() — ui Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  7d540e9b_1500_0e79_533d_f4b2ffdbead7["CommandItem()"]
  7a7173b4_d7f5_0575_733b_2098f08eb77d["command.tsx"]
  7d540e9b_1500_0e79_533d_f4b2ffdbead7 -->|defined in| 7a7173b4_d7f5_0575_733b_2098f08eb77d
  style 7d540e9b_1500_0e79_533d_f4b2ffdbead7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/registry/new-york-v4/ui/command.tsx lines 142–156

function CommandItem({
  className,
  ...props
}: React.ComponentProps<typeof CommandPrimitive.Item>) {
  return (
    <CommandPrimitive.Item
      data-slot="command-item"
      className={cn(
        "data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
        className
      )}
      {...props}
    />
  )
}

Subdomains

Frequently Asked Questions

What does CommandItem() do?
CommandItem() is a function in the ui codebase, defined in apps/v4/registry/new-york-v4/ui/command.tsx.
Where is CommandItem() defined?
CommandItem() is defined in apps/v4/registry/new-york-v4/ui/command.tsx at line 142.

Analyze Your Own Codebase

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

Try Supermodel Free