On this page
@addTagHelper *, Webority.Ui.RazorOn a site
Put it in the header beside the logo, and mark the visitor's page as current so they know where they are.
Entry shapes
Use a plain link for one destination, and a panel for a group of links with descriptions or icons.
Every option
Every value of every prop, one cell each.
items: entry shapes
link entry
current page
panel of links
descriptions
icons
current link
key: the entry's key, not shown, no visible change
ariaLabel
ariaLabel: names the landmark for screen readers, default Main
linkComponent
linkComponent: React only, a router link; Razor links are plain a
className
class: an extra class on the root, for the page's own styling
Guidance
What to do, and what to avoid.
Use it when
- A public site or portal header has sections, each with several destinations worth a short description.
- Some entries are plain links beside the ones with panels.
Reach for something else when
- A signed-in app's sidebar of destinations. → AppShell
- One button opens a short list of actions. → AppDropdown
Reference
Try every prop, read the full list, and check keyboard and screen reader behaviour.
3 props. The 1 most used come first.
Used on most screens 1 props
| Prop | Type | Default | Description |
|---|---|---|---|
| aria-labeldefault Main | string | Main | The accessible name of the navigation landmark. |
Less common 2 props
| Prop | Type | Default | Description |
|---|---|---|---|
| <app-navigation-menu-item>default - | child | - | Razor writes the entries as child elements of the menu, and renders each link as a plain link. |
| <app-navigation-menu-link>default - | child | - | A link inside an entry with links, rendered as a plain link. |
On <app-navigation-menu-item>: label (required), key (the entry's id in the toggle event; its position when omitted), href (the link's URL, for an entry without links) and current. On <app-navigation-menu-link>: label and href (both required), description, icon (a library icon name) and current. A page can follow a panel through the bubbling wui-navigation-menu:toggle event (detail.key, detail.open).
Screen reader
3 notes- The entries sit in a navigation landmark named by ariaLabel, and the current page is marked with aria-current page.
- A panel button reports aria-expanded and names its panel through aria-controls; a panel opens on click, Enter, Space or Down, never on hover alone.
- Escape closes the panel and returns focus to its button, and Left and Right move along the entries.