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
  45e493c2_f998_6f43_3cf0_d6cc8ebb98b4["CommandItem()"]
  28611210_7d61_d0c9_2117_f6f1cdf206c1["command.tsx"]
  45e493c2_f998_6f43_3cf0_d6cc8ebb98b4 -->|defined in| 28611210_7d61_d0c9_2117_f6f1cdf206c1
  style 45e493c2_f998_6f43_3cf0_d6cc8ebb98b4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/registry/bases/base/ui/command.tsx lines 154–179

function CommandItem({
  className,
  children,
  ...props
}: React.ComponentProps<typeof CommandPrimitive.Item>) {
  return (
    <CommandPrimitive.Item
      data-slot="command-item"
      className={cn(
        "cn-command-item group/command-item data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
        className
      )}
      {...props}
    >
      {children}
      <IconPlaceholder
        lucide="CheckIcon"
        tabler="IconCheck"
        hugeicons="Tick02Icon"
        phosphor="CheckIcon"
        remixicon="RiCheckLine"
        className="cn-command-item-indicator ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"
      />
    </CommandPrimitive.Item>
  )
}

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free