Navigation Menu
A collection of links for navigating websites, sharing one animated popup between top-level menu triggers, built on the Base UI Navigation Menu primitive.
Installation
Bash
Usage
API reference
NavigationMenu
Extends the Base UI Navigation Menu Root. Hover-open timing lives here, unlike our other overlays where it lives on the trigger.
| Prop | Type | Default |
|---|---|---|
value / defaultValue | string | — |
onValueChange | (value) => void | — |
delay / closeDelay | number | 50 (ms) each |
orientation | "horizontal" | "vertical" | "horizontal" |
NavigationMenuContent
Every panel shares one popup: each content portals into the single
Viewport inside the shared Popup, and the trigger writes
--popup-width/--popup-height (and positioner equivalents) as it
switches, so the popup resizes and slides to the active trigger. Content
cross-fades directionally via data-activation-direction
(left/right/up/down) combined with
data-starting-style/data-ending-style. The primitive’s keepMounted
(for SSR/crawler-visible closed panels) is not set by default — compose
the primitive directly when that matters. For tall panels, cap height
with max-h-[var(--available-height)] and prefer
Scroll Area inside.
NavigationMenuLink
Renders a real <a>. Compose framework routers with the render prop:
<NavigationMenuLink render={<Link href="/docs" />} />.
| Prop | Type | Default |
|---|---|---|
closeOnClick | boolean | false |
active | boolean — sets data-active | false |
NavigationMenuList, NavigationMenuItem, NavigationMenuTrigger, NavigationMenuPositioner, NavigationMenuIndicator
Styled parts. The Positioner carries an invisible before: hover bridge
spanning the sideOffset gap — without it, moving the pointer from a
trigger into the popup would cross a non-hoverable gap and close the
menu.