shadcn.io is not affiliated with official shadcn/ui
Navigation Menu examples · Standard
Mixed Links and Dropdowns Navigation Menu for React
A navigation menu that mixes Products and Support dropdowns with plain Pricing and About links.
Products and Support open lists of links; Pricing and About in between go straight to their pages. Most site headers look like this: a few sections with sub-pages, and a few single pages.
Preview
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 the Next.js Link through render, as in render={<Link href="#" />}.
Related
- Simple Navigation Navigation MenuA navigation menu with Products and
- Navigation without Viewport Navigation MenuProducts and Company dropdowns that each
- Navigation with Descriptions Navigation MenuA Resources dropdown whose links pair an
- Full Mega Menu Navigation MenuA wide Platform mega menu with feature
- Navigation with Icons Navigation MenuA Features dropdown whose links each
- Dashboard-style with Stats Navigation MenuAn Analytics dropdown with four stat