Home / Function/ SidebarMenuAction() — ui Function Reference

SidebarMenuAction() — ui Function Reference

Architecture documentation for the SidebarMenuAction() function in sidebar.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  261e5050_9ac7_43ca_f9a1_8d72a7216076["SidebarMenuAction()"]
  9d6532a9_426f_ea68_5d06_31eaecadb210["sidebar.tsx"]
  261e5050_9ac7_43ca_f9a1_8d72a7216076 -->|defined in| 9d6532a9_426f_ea68_5d06_31eaecadb210
  style 261e5050_9ac7_43ca_f9a1_8d72a7216076 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

deprecated/www/registry/new-york/ui/sidebar.tsx lines 611–633

>(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
  const Comp = asChild ? Slot : "button"

  return (
    <Comp
      ref={ref}
      data-sidebar="menu-action"
      className={cn(
        "absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0",
        // Increases the hit area of the button on mobile.
        "after:absolute after:-inset-2 after:md:hidden",
        "peer-data-[size=sm]/menu-button:top-1",
        "peer-data-[size=default]/menu-button:top-1.5",
        "peer-data-[size=lg]/menu-button:top-2.5",
        "group-data-[collapsible=icon]:hidden",
        showOnHover &&
          "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",
        className
      )}
      {...props}
    />
  )
})

Subdomains

Frequently Asked Questions

What does SidebarMenuAction() do?
SidebarMenuAction() is a function in the ui codebase, defined in deprecated/www/registry/new-york/ui/sidebar.tsx.
Where is SidebarMenuAction() defined?
SidebarMenuAction() is defined in deprecated/www/registry/new-york/ui/sidebar.tsx at line 611.

Analyze Your Own Codebase

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

Try Supermodel Free