SidebarMenuSubButton() — ui Function Reference
Architecture documentation for the SidebarMenuSubButton() function in sidebar.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 3a1465b9_458d_7aac_66f7_4876761923f1["SidebarMenuSubButton()"] 0dd28c0a_4131_40f2_8cf0_e0611d33faf6["sidebar.tsx"] 3a1465b9_458d_7aac_66f7_4876761923f1 -->|defined in| 0dd28c0a_4131_40f2_8cf0_e0611d33faf6 style 3a1465b9_458d_7aac_66f7_4876761923f1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/registry/new-york-v4/ui/sidebar.tsx lines 669–699
function SidebarMenuSubButton({
asChild = false,
size = "md",
isActive = false,
className,
...props
}: React.ComponentProps<"a"> & {
asChild?: boolean
size?: "sm" | "md"
isActive?: boolean
}) {
const Comp = asChild ? Slot.Root : "a"
return (
<Comp
data-slot="sidebar-menu-sub-button"
data-sidebar="menu-sub-button"
data-size={size}
data-active={isActive}
className={cn(
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
size === "sm" && "text-xs",
size === "md" && "text-sm",
"group-data-[collapsible=icon]:hidden",
className
)}
{...props}
/>
)
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does SidebarMenuSubButton() do?
SidebarMenuSubButton() is a function in the ui codebase, defined in apps/v4/registry/new-york-v4/ui/sidebar.tsx.
Where is SidebarMenuSubButton() defined?
SidebarMenuSubButton() is defined in apps/v4/registry/new-york-v4/ui/sidebar.tsx at line 669.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free