main-nav.tsx — ui Source File
Architecture documentation for main-nav.tsx, a tsx file in the ui codebase. 5 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 2d36a508_952d_a71d_7e85_b9ded4d7fc06["main-nav.tsx"] ba3d44f3_7b34_f9cc_6283_44817785c0df["link"] 2d36a508_952d_a71d_7e85_b9ded4d7fc06 --> ba3d44f3_7b34_f9cc_6283_44817785c0df f5b0b1d9_de2f_9c31_0bcd_4adbd07581cb["navigation"] 2d36a508_952d_a71d_7e85_b9ded4d7fc06 --> f5b0b1d9_de2f_9c31_0bcd_4adbd07581cb 109802f5_d07a_09ac_1761_f7055113f24f["site"] 2d36a508_952d_a71d_7e85_b9ded4d7fc06 --> 109802f5_d07a_09ac_1761_f7055113f24f 79081a1f_55a3_945a_fb8c_d53d6d3eab81["utils"] 2d36a508_952d_a71d_7e85_b9ded4d7fc06 --> 79081a1f_55a3_945a_fb8c_d53d6d3eab81 aae3c3f1_230a_9c11_a663_8bbc3f0ad054["icons"] 2d36a508_952d_a71d_7e85_b9ded4d7fc06 --> aae3c3f1_230a_9c11_a663_8bbc3f0ad054 style 2d36a508_952d_a71d_7e85_b9ded4d7fc06 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import Link from "next/link"
import { usePathname } from "next/navigation"
import { siteConfig } from "@/config/site"
import { cn } from "@/lib/utils"
import { Icons } from "@/components/icons"
export function MainNav() {
const pathname = usePathname()
return (
<div className="mr-4 hidden md:flex">
<Link href="/" className="mr-4 flex items-center gap-2 lg:mr-6">
<Icons.logo className="h-6 w-6" />
<span className="hidden font-bold lg:inline-block">
{siteConfig.name}
</span>
</Link>
<nav className="flex items-center gap-4 text-sm xl:gap-6">
<Link
href="/docs/installation"
className={cn(
"transition-colors hover:text-foreground/80",
pathname === "/docs/installation"
? "text-foreground"
: "text-foreground/80"
)}
>
Docs
</Link>
<Link
href="/docs/components"
className={cn(
"transition-colors hover:text-foreground/80",
pathname?.startsWith("/docs/components") &&
!pathname?.startsWith("/docs/component/chart")
? "text-foreground"
: "text-foreground/80"
)}
>
Components
</Link>
<Link
href="/blocks"
className={cn(
"transition-colors hover:text-foreground/80",
pathname?.startsWith("/blocks")
? "text-foreground"
: "text-foreground/80"
)}
>
Blocks
</Link>
<Link
href="/charts"
className={cn(
"transition-colors hover:text-foreground/80",
pathname?.startsWith("/docs/component/chart") ||
pathname?.startsWith("/charts")
? "text-foreground"
: "text-foreground/80"
)}
>
Charts
</Link>
<Link
href="/themes"
className={cn(
"transition-colors hover:text-foreground/80",
pathname?.startsWith("/themes")
? "text-foreground"
: "text-foreground/80"
)}
>
Themes
</Link>
<Link
href="/colors"
className={cn(
"transition-colors hover:text-foreground/80",
pathname?.startsWith("/colors")
? "text-foreground"
: "text-foreground/80"
)}
>
Colors
</Link>
</nav>
</div>
)
}
Domain
Subdomains
Functions
Dependencies
- icons
- link
- navigation
- site
- utils
Source
Frequently Asked Questions
What does main-nav.tsx do?
main-nav.tsx is a source file in the ui codebase, written in tsx. It belongs to the ComponentRegistry domain, UIPrimitives subdomain.
What functions are defined in main-nav.tsx?
main-nav.tsx defines 1 function(s): MainNav.
What does main-nav.tsx depend on?
main-nav.tsx imports 5 module(s): icons, link, navigation, site, utils.
Where is main-nav.tsx in the architecture?
main-nav.tsx is located at deprecated/www/components/main-nav.tsx (domain: ComponentRegistry, subdomain: UIPrimitives, directory: deprecated/www/components).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free