Home / Function/ DropdownMenuItem() — ui Function Reference

DropdownMenuItem() — ui Function Reference

Architecture documentation for the DropdownMenuItem() function in dropdown-menu.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  105a826e_bff8_d4ab_c435_90a28f2fe3f3["DropdownMenuItem()"]
  febdc062_65bf_baa1_0c99_f0e8129d515e["dropdown-menu.tsx"]
  105a826e_bff8_d4ab_c435_90a28f2fe3f3 -->|defined in| febdc062_65bf_baa1_0c99_f0e8129d515e
  style 105a826e_bff8_d4ab_c435_90a28f2fe3f3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/examples/radix/ui-rtl/dropdown-menu.tsx lines 63–84

function DropdownMenuItem({
  className,
  inset,
  variant = "default",
  ...props
}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
  inset?: boolean
  variant?: "default" | "destructive"
}) {
  return (
    <DropdownMenuPrimitive.Item
      data-slot="dropdown-menu-item"
      data-inset={inset}
      data-variant={variant}
      className={cn(
        "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
        className
      )}
      {...props}
    />
  )
}

Subdomains

Frequently Asked Questions

What does DropdownMenuItem() do?
DropdownMenuItem() is a function in the ui codebase, defined in apps/v4/examples/radix/ui-rtl/dropdown-menu.tsx.
Where is DropdownMenuItem() defined?
DropdownMenuItem() is defined in apps/v4/examples/radix/ui-rtl/dropdown-menu.tsx at line 63.

Analyze Your Own Codebase

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

Try Supermodel Free