shadcn.io is an independent project built on shadcn/ui
The bar shows Products, Pricing, About, and Support. Products lists Analytics, Marketing, and Commerce. Support lists Help Center, Contact Us, and Status. Pricing and About are links.
Mix links and dropdowns when only some items have children. If every item is one action, use a Menubar. In React, Ark UI closes the open panel when you press Escape.
Installation
Anatomy

Usage
<div className="w-full max-w-md rounded-md border bg-background p-px">
<NavigationMenu>
<NavigationMenuList>
<NavigationMenuItem>
<NavigationMenuTrigger>Products</NavigationMenuTrigger>
<NavigationMenuContent>
<div className="flex w-48 flex-col">
{products.map((item) => (
<NavigationMenuLink asChild key={item.label}>
<Link href={item.href}>{item.label}</Link>
</NavigationMenuLink>
))}
</div>
</NavigationMenuContent>
</NavigationMenuItem>
<NavigationMenuItem>
<NavigationMenuLink asChild className={navigationMenuTriggerStyle()}>
<Link href="#">Pricing</Link>
</NavigationMenuLink>
</NavigationMenuItem>
<NavigationMenuItem>
<NavigationMenuLink asChild className={navigationMenuTriggerStyle()}>
<Link href="#">About</Link>
</NavigationMenuLink>
</NavigationMenuItem>
<NavigationMenuItem>
<NavigationMenuTrigger>Support</NavigationMenuTrigger>
<NavigationMenuContent>
<div className="flex w-48 flex-col">
{support.map((item) => (
<NavigationMenuLink asChild key={item.label}>
{/* The rest of the file is under Installation. */}FAQ
How do plain links match the triggers?
Pricing and About take navigationMenuTriggerStyle() as their class, the same height, padding and hover as the triggers, so the row reads as one menu.
What is in each dropdown?
A w-48 column of NavigationMenuLinks: Analytics, Marketing and Commerce under Products; Help Center, Contact Us and Status under Support.
Can links and dropdowns go in any order?
Yes. Each is its own NavigationMenuItem, and the list keeps the order you write them in.
How do the links use my router?
Each link is your router's link rendered through NavigationMenuLink, so it keeps the menu's styles and focus handling.
NavigationMenuLink takes asChild, and the demo puts the Next.js Link inside it.
API Reference
Navigation Menu
Sets asChild. The rest is on the Navigation Menu page.




