NavigationMenu
A horizontal site-level navigation bar with rich popover panels for nested sections, built on Radix Navigation Menu.
Renders inside a nav landmark; triggers expose aria-expanded / aria-controls; arrow keys traverse top-level items; Esc closes any open panel.
Variants
Section titled “Variants”Rich content panels
Section titled “Rich content panels”Each NavigationMenuContent renders inside an elevated Card — fill it with any layout you like (grids, columns, banners).
Hide the trigger chevron
Section titled “Hide the trigger chevron”Pass hideChevron to NavigationMenuTrigger when the label is self-explanatory or you want to provide your own affordance.
Active link
Section titled “Active link”Mark a NavigationMenuLink with active to set aria-current="page" plus a data-active flag.
With indicator
Section titled “With indicator”Render NavigationMenuIndicator inside the list to show a small arrow pointing from the open trigger to its panel. Use this with NavigationMenuViewport for the shared-panel animation pattern.
Accessibility
Section titled “Accessibility”- The root renders inside a
<nav>so screen readers identify it as primary navigation. - Triggers expose
aria-expanded/aria-controlslinking to theirNavigationMenuContentpanel (handled by Radix). - Left and right arrow keys move between top-level triggers; pressing
Enter,Space, or↓opens the focused trigger’s panel. Esccloses any open panel and returns focus to its trigger.NavigationMenuLinkwithactivesetsaria-current="page"so the current route is announced.
Recipes
Section titled “Recipes”- Use
NavigationMenuViewportonce at the end of the list when you want a single shared panel that animates between triggers. - Use
NavigationMenuSubfor nested sub-panels (rare, but exposed for parity with Radix). - Swap to a
DrawerorSidebarbelow the tablet breakpoint where horizontal space runs out. - Wrap
NavigationMenuLinkwithasChildto compose with a router-aware<Link>.