Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Navigation Menu examples · Features

Feature Sections with Headers Navigation Menu for React

A Collaboration dropdown that groups its links under Team Tools, Project Tools and Management headings.

Framework
UI library

Collaboration opens one column with three headed sections, Team Tools, Project Tools and Management, each with two described links. Headings make a longer list easy to scan without a wide panel.

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 sections built?

From a list of sections at the top of the file, each a title and its links. Each renders an h4 heading followed by its NavigationMenuLinks.

How are the icons rendered?

Each item's icon is a Lucide component stored in the data, rendered inside the link and hidden from assistive tech, since the label beside it names the link.

How wide is the panel?

w-[400px] with max-w-full, so it fits narrow screens too.

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.