nav-main.tsx — ui Source File
Architecture documentation for nav-main.tsx, a tsx file in the ui codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR d9c9f8e3_fed8_f86c_a42f_06dcbe4af1e7["nav-main.tsx"] d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"] d9c9f8e3_fed8_f86c_a42f_06dcbe4af1e7 --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3 194a9418_8170_2169_6f94_b2f555b74f26["dropdown-menu"] d9c9f8e3_fed8_f86c_a42f_06dcbe4af1e7 --> 194a9418_8170_2169_6f94_b2f555b74f26 6ff5c02b_2b25_4633_4ccd_fd28f2f55862["sidebar"] d9c9f8e3_fed8_f86c_a42f_06dcbe4af1e7 --> 6ff5c02b_2b25_4633_4ccd_fd28f2f55862 style d9c9f8e3_fed8_f86c_a42f_06dcbe4af1e7 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import { MoreHorizontal, type LucideIcon } from "lucide-react"
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from "@/registry/new-york/ui/dropdown-menu"
import {
SidebarGroup,
SidebarMenu,
SidebarMenuButton,
SidebarMenuItem,
useSidebar,
} from "@/registry/new-york/ui/sidebar"
export function NavMain({
items,
}: {
items: {
title: string
url: string
icon?: LucideIcon
isActive?: boolean
items?: {
title: string
url: string
}[]
}[]
}) {
const { isMobile } = useSidebar()
return (
<SidebarGroup>
<SidebarMenu>
{items.map((item) => (
<DropdownMenu key={item.title}>
<SidebarMenuItem>
<DropdownMenuTrigger asChild>
<SidebarMenuButton className="data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground">
{item.title} <MoreHorizontal className="ml-auto" />
</SidebarMenuButton>
</DropdownMenuTrigger>
{item.items?.length ? (
<DropdownMenuContent
side={isMobile ? "bottom" : "right"}
align={isMobile ? "end" : "start"}
className="min-w-56 rounded-lg"
>
{item.items.map((item) => (
<DropdownMenuItem asChild key={item.title}>
<a href={item.url}>{item.title}</a>
</DropdownMenuItem>
))}
</DropdownMenuContent>
) : null}
</SidebarMenuItem>
</DropdownMenu>
))}
</SidebarMenu>
</SidebarGroup>
)
}
Domain
Subdomains
Functions
Dependencies
- dropdown-menu
- lucide-react
- sidebar
Source
Frequently Asked Questions
What does nav-main.tsx do?
nav-main.tsx is a source file in the ui codebase, written in tsx. It belongs to the ComponentRegistry domain, ChartRegistry subdomain.
What functions are defined in nav-main.tsx?
nav-main.tsx defines 1 function(s): NavMain.
What does nav-main.tsx depend on?
nav-main.tsx imports 3 module(s): dropdown-menu, lucide-react, sidebar.
Where is nav-main.tsx in the architecture?
nav-main.tsx is located at deprecated/www/registry/new-york/blocks/sidebar-06/components/nav-main.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: deprecated/www/registry/new-york/blocks/sidebar-06/components).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free