Skip to content

shadcn.io is an independent project built on shadcn/ui

Industry Solutions Navigation Menu for React

An Industries dropdown headed SOLUTIONS BY INDUSTRY, with six industry tiles in three columns, each with an icon and a description.

The bar shows Industries. The panel is headed SOLUTIONS BY INDUSTRY and lists Financial Services, E-commerce, Education, Healthcare, Professional Services, and Real Estate.

Use the grid when each industry needs one line of copy. A dedicated page of Card blocks fits when each industry is a long story. In React, Base UI moves between the triggers with Tab.

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.
Use email insteadNo credit card

Anatomy

Navigation Menu anatomy: list, trigger, indicator, content, link

Usage

<div className="w-full max-w-md rounded-md border bg-background p-px">
  <NavigationMenu>
    <NavigationMenuList>
      <NavigationMenuItem>
        <NavigationMenuTrigger>Industries</NavigationMenuTrigger>
        <NavigationMenuContent>
          <div className="flex w-[700px] max-w-full flex-col gap-4 p-2">
            <div className="px-2">
              <h3 className="font-semibold text-muted-foreground text-sm">
                SOLUTIONS BY INDUSTRY
              </h3>
              <p className="mt-1 text-muted-foreground text-sm">
                Tailored solutions for your specific industry needs
              </p>
            </div>
            <div className="grid grid-cols-3 gap-4">
              {industries.map((industry) => (
                <NavigationMenuLink
                  className="flex-col items-start gap-3"
                  key={industry.name}
                  render={<Link href={industry.href} />}
                >
                  <div className="flex size-12 items-center justify-center rounded-lg bg-primary/10">
                    <industry.icon
                      aria-hidden="true"
                      className="size-6 text-primary"
                    />
                  </div>
                  <div>
                    <div className="font-medium">{industry.name}</div>
                    <p className="text-muted-foreground text-sm">
{/* The rest of the file is under Installation. */}

FAQ

How is the icon tile styled?

A size-12 rounded square with bg-primary/10 and the icon in text-primary, so it follows the theme's primary color.

How is each link laid out?

The link takes flex-col items-start gap-3: the tile on top, the name and description below.

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.

API Reference

Navigation Menu

No extra props in this demo. The rest is on the Navigation Menu page.