Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Navigation Menu examples · Complex

Mixed Content Types Navigation Menu for React

A Solutions mega menu mixing solution cards with badges, a webinar promo and a Start Building panel.

Framework
UI library

Solutions opens four solution cards in a grid, two with Popular or New badges, beside a webinar promo with Watch Now and a Start Building panel with two buttons. One panel mixes navigation, promotion and sign-up.

Preview

Preview width

Installation

Sign in to get your install command
Free with an account. It carries your token, so the CLI installs everything in one go.

FAQ

How are the solution cards built?

Each card is a NavigationMenuLink with flex-col: the icon and an optional Badge on top, the title and description below.

Do the buttons navigate?

Not in the demo: Watch Now, Create Account and View Docs are Buttons with no handler. Link them to their pages.

What happens on narrow screens?

The panel is w-[800px] with max-w-full, so it never grows past the screen, but its columns get tight. Below the md breakpoint, show the same links in a Sheet or a Drawer instead.

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="#" />}.

How does the menu work from the keyboard?

Tab moves between the triggers and the links, Enter or Space opens a trigger's panel, and Escape closes it and returns focus to the trigger. The root is a nav, so screen readers list it as a navigation landmark.

How do I mark the current page?

Set aria-current="page" on the NavigationMenuLink that matches the route, and style it with the aria-[current=page]: variant. active on NavigationMenuLink sets it for you.