Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Navigation Menu examples · Features

Feature Categories Navigation Menu for React

A Solutions dropdown with six titled categories in two columns, each holding two described links.

Framework
UI library

Solutions opens six categories, from For Enterprise to Certification, each with an icon, a title and two described links. The panel groups a large set of pages by audience so people find their part fast.

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 do the categories fill two columns?

The panel is a grid with grid-flow-col and three rows, so the first three categories fill the first column and the next three the second.

Are the category titles links?

No. They are h4 headings with an icon in the primary color; only the two entries under each are NavigationMenuLinks.

What happens on narrow screens?

The panel is w-[600px] 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.