Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Navigation Menu examples · Marketing

Resources with Lead Magnets Navigation Menu for React

A Resources dropdown with resource links, a featured guide to download and a webinar to register for.

Framework
UI library

Resources opens three resource links, a featured guide with Download Free, and a webinar banner with Register Now below. The menu doubles as a place to collect sign-ups.

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 is Video Tutorials marked Free?

Its data has a badge, rendered as a secondary Badge next to the name. Links without one show only the name.

Do Download Free and Register Now do anything?

Not in the demo: they are Buttons with no handler. Link them to your download and registration pages.

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.