Navigation Menu
Navigates related pages hierarchically.
Preview
Local preview. It doesn't affect real accounts, environments, or run data.
Compare the same example at each size and density. Switching keeps input values and selection state. Size guidance and comparisons
Open section: none. Current product: workspace.
Usage
Group links and sub-navigation to products, docs, and sections. It keeps the native nav, ul, li, and a structure. Trigger opens sub-links, and Link navigates. Set Link.active to mark the current destination. A vertical list also serves as a table of contents: mark the section in view with aria-current="location", which draws as the current page does, and a label that wraps keeps its room above and below. Page tabs that may not fit, as on a phone, take overflow='scroll': the list stays on one line and scrolls sideways, and the current link stays in view.
Use Menu or Menubar for commands, and Tabs for switching panels on one screen. Keep links native, and don't give nav role=menu. Don't make it hover-only. Provide click and keyboard paths, on small screens too.
Size: SizeProvider size="small" resizes the whole composition, including portals. The default size is Default. Size guidance and comparisons
Anatomy
Root(nav) → List(ul) → Item(li) → Trigger + Content; Portal → Positioner → Popup(nav) → Viewport
Keyboard and accessibility
- Once a Trigger's sub-links are open, Tab moves into them. Tab and arrow keys move through the sub-links.
- Arrow keys move between top-level items. In a horizontal layout, ArrowDown also opens a Trigger's sub-links.
- Enter or Space opens a Trigger's sub-links. Enter on a sub-link navigates.
- Escape closes the sub-links.
- For RTL, set both DirectionProvider and the DOM dir.
- For a vertical layout, set orientation=vertical. It changes both semantics and layout.
Give each control a name that describes its purpose. Connect error messages to their controls, and signal state with more than color. Automated checks don't replace manual keyboard and assistive technology testing.
Example code
Shared components take their styles from design tokens. Each example sets its own composition and accessibility attributes. The calling screen defines callbacks, refs, and product data.
Key API
The table lists the common wrapper's main props. See the package type declarations for the full types.