SidebarMenuAction() — ui Function Reference
Architecture documentation for the SidebarMenuAction() function in sidebar.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 5568027a_5b66_9d0f_2437_d2c60ce2712e["SidebarMenuAction()"] c3d1b2a8_7455_5144_ec35_453b78980e06["sidebar.tsx"] 5568027a_5b66_9d0f_2437_d2c60ce2712e -->|defined in| c3d1b2a8_7455_5144_ec35_453b78980e06 style 5568027a_5b66_9d0f_2437_d2c60ce2712e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/examples/radix/ui/sidebar.tsx lines 539–563
function SidebarMenuAction({
className,
asChild = false,
showOnHover = false,
...props
}: React.ComponentProps<"button"> & {
asChild?: boolean
showOnHover?: boolean
}) {
const Comp = asChild ? Slot.Root : "button"
return (
<Comp
data-slot="sidebar-menu-action"
data-sidebar="menu-action"
className={cn(
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",
showOnHover &&
"peer-data-active/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 aria-expanded:opacity-100 md:opacity-0",
className
)}
{...props}
/>
)
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does SidebarMenuAction() do?
SidebarMenuAction() is a function in the ui codebase, defined in apps/v4/examples/radix/ui/sidebar.tsx.
Where is SidebarMenuAction() defined?
SidebarMenuAction() is defined in apps/v4/examples/radix/ui/sidebar.tsx at line 539.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free