NavigationMenu
Group links and identify the current page.
alpina-ui/portal/navigation-menuUsage 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.
| Key | Action |
|---|---|
| Tab / Shift+Tab | Move between visible navigation links and the optional disclosure. |
| Enter | Follow the focused link. |
| Enter / Space | Open or close the mobile navigation with its Menu button. |
| Escape | Dismiss 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
npx --no-install alpina add navigation-menu