Nav() — ui Function Reference
Architecture documentation for the Nav() function in nav.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 84781788_bf68_4fab_221c_7ea3f9566386["Nav()"] 2711555e_9a73_12c1_8164_9541fc887caa["nav.tsx"] 84781788_bf68_4fab_221c_7ea3f9566386 -->|defined in| 2711555e_9a73_12c1_8164_9541fc887caa style 84781788_bf68_4fab_221c_7ea3f9566386 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
deprecated/www/app/(app)/examples/mail/components/nav.tsx lines 24–87
export function Nav({ links, isCollapsed }: NavProps) {
return (
<div
data-collapsed={isCollapsed}
className="group flex flex-col gap-4 py-2 data-[collapsed=true]:py-2"
>
<nav className="grid gap-1 px-2 group-[[data-collapsed=true]]:justify-center group-[[data-collapsed=true]]:px-2">
{links.map((link, index) =>
isCollapsed ? (
<Tooltip key={index} delayDuration={0}>
<TooltipTrigger asChild>
<Link
href="#"
className={cn(
buttonVariants({ variant: link.variant, size: "icon" }),
"h-9 w-9",
link.variant === "default" &&
"dark:bg-muted dark:text-muted-foreground dark:hover:bg-muted dark:hover:text-white"
)}
>
<link.icon className="h-4 w-4" />
<span className="sr-only">{link.title}</span>
</Link>
</TooltipTrigger>
<TooltipContent side="right" className="flex items-center gap-4">
{link.title}
{link.label && (
<span className="ml-auto text-muted-foreground">
{link.label}
</span>
)}
</TooltipContent>
</Tooltip>
) : (
<Link
key={index}
href="#"
className={cn(
buttonVariants({ variant: link.variant, size: "sm" }),
link.variant === "default" &&
"dark:bg-muted dark:text-white dark:hover:bg-muted dark:hover:text-white",
"justify-start"
)}
>
<link.icon className="mr-2 h-4 w-4" />
{link.title}
{link.label && (
<span
className={cn(
"ml-auto",
link.variant === "default" &&
"text-background dark:text-white"
)}
>
{link.label}
</span>
)}
</Link>
)
)}
</nav>
</div>
)
}
Domain
Subdomains
Source
Frequently Asked Questions
What does Nav() do?
Nav() is a function in the ui codebase, defined in deprecated/www/app/(app)/examples/mail/components/nav.tsx.
Where is Nav() defined?
Nav() is defined in deprecated/www/app/(app)/examples/mail/components/nav.tsx at line 24.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free