Navigation Menu

Site navigation with links and buttons that open panels of more links.
Stable
Web
iOS
Android
@advui/core
Source

Installation

pnpm
pnpm add @advui/core
npm
npm install @advui/core

Usage

import { NavigationMenu } from '@advui/core'

<NavigationMenu aria-label="Main">
  <NavigationMenu.Link href="/" active>Home</NavigationMenu.Link>
  <NavigationMenu.Item label="Data">
    <NavigationMenu.Link href="/5w" description="Who does what, where">5W dashboard</NavigationMenu.Link>
  </NavigationMenu.Item>
</NavigationMenu>

API reference

NavigationMenu

PropTypeDefaultDescription
aria-labelstring'Main'Names the landmark. Needed when a page has more than one.
valuestring | null—The open item (its `value` or `label`).
defaultValuestring | null—Starting `value` when uncontrolled.
onValueChange(value: string | null) => void—Called with the new `value`.

NavigationMenu.Link

PropTypeDefaultDescription
hrefstring—Link target. On iOS and Android a path goes to the router registered with `setRouter`, and an absolute URL opens with the system.
onPress(event) => void—Called before the `href` is followed; `event.preventDefault()` stops it. Without an `href`, navigate here.
renderReactElement—Your router’s link, e.g. `render={<Link href="/maps" />}`.
activebooleanfalseThe current page (`aria-current="page"`).
descriptionReactNode—Second line, in panels.
iconReactNode—Icon before the title, in panels.

NavigationMenu.Item

PropTypeDefaultDescription
label requiredstring—Button text.
valuestring—Id for `value`. Default: `label`.
panelWidthSizeTokens | number'72'Width of the panel. iOS and Android show the links under the bar.Web only.
children requiredReactNode—`NavigationMenu.Link` elements shown in the panel.

Accessibility

  • A nav landmark with a list of links and buttons. It follows the WAI-ARIA disclosure navigation pattern, not menu, so every link is a normal Tab stop and is announced as a link.
  • Item buttons set aria-expanded and (on web) aria-controls pointing at their panel.
  • The current page has aria-current="page" on web; on native its name ends with "current page".
  • Escape closes the open panel and returns focus to its button. Pressing or tabbing outside closes it, and so does following a link.
Keyboard interactions
KeyAction
TabMoves through the links and buttons, into an open panel.
Enter / SpaceOpens or closes a panel; follows a link.
EscapeCloses the panel and focuses its button.

Responsive behavior

The bar wraps when it runs out of room. On phones, prefer a Sidebar in a Drawer for long navigation.

Platform notes

Web
Panels float under their button (zIndex.dropdown).
iOS
The open panel shows under the bar instead of floating, so it never covers the screen. A path in href goes to the router registered with setRouter (since 0.15.0; before, links navigated only in onPress).
Android
Same as iOS; the back button closes an open panel.
Since v0.6.0Last updated Nov 2, 2026Edit this page on GitHub