Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Navigation Menu examples · Marketing

Pricing Tiers Preview Navigation Menu for React

A Pricing dropdown that previews three plans side by side, with the middle one highlighted as Popular.

Framework
UI library

Pricing opens three plans, Starter, Professional and Enterprise, each with its price, three features and a link. The middle plan has a thicker primary border and a Popular badge. People compare plans before they reach the pricing page.

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 the Popular plan highlighted?

Its card adds border-2 border-primary, joined with cn, and a Badge centered on its top edge. The other cards keep the plain border.

Which part of a card is the link?

Only the call to action at the bottom, Get Started or Contact Sales, is a NavigationMenuLink. The rest of the card is plain text, so the features can be read without following the link.

What happens on narrow screens?

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