Skip to content

NavigationMenu

Group links and identify the current page.

alpina-ui/portal/navigation-menu

Interactive preview

Usage notes

Use a named navigation landmark and mark its current link. With horizontal orientation, collapseLabel supplies a button for the narrow-screen link panel. The browser opens the panel with Enter or Space and returns focus on Escape, even without JavaScript. Choose a paper, ink or accent surface for a navigation bar. Pass a NavigationBrand through brand and release links, repository links and ThemeToggle through actions. ThemeToggle follows the device until a reader chooses light or dark, persists the preference, and accepts translated labels.

When to use

Move among the top-level sections of a site using links people can bookmark and open in another tab.

When to avoid

Use DropdownMenu for commands that change the current item, such as duplicating an invoice.

Accessibility

Give each navigation landmark a distinct name when several are present. Expose the active link with aria-current and retain native link behaviour.

Keys
KeyAction
Tab / Shift+TabMove between visible navigation links and the optional disclosure.
EnterFollow the focused link.
Enter / SpaceOpen or close the mobile navigation with its Menu button.
EscapeDismiss the open navigation and return focus to its Menu button.

Content

Prefer short destination names. Keep the visible label close to the destination page heading in each language.

Use
Services / Fees / Contact
Avoid
Explore / More / Discover

Copy in four languages

German
Dienstleistungen16 characters
French
Prestations11 characters
Italian
Servizi7 characters
Romansh
Servetschs10 characters
Add to your project
npx --no-install alpina add navigation-menu