On this page
@addTagHelper *, Webority.Ui.RazorOn a page
Put the rail beside the content it filters, and mark the page the visitor is on so the rail shows where they are.
A mailbox rail
Row kinds
A row is a link with a target, a button without one, and it takes an icon or a dot, plus a count when there is one.
Link, current and button rows
Dot and count
Every option
Every value of every prop, one cell each.
label
label: names the landmark, not drawnitems
items: no rows (default), an empty railitems: one app-nav-list-item per row (React items)to / href
href: link rowno href: button rowicon
icon="chart"dotTone
dot-tone="primary"dot-tone="info"dot-tone="success"dot-tone="warning"dot-tone="danger"dot-tone="neutral"count
count="7", with a dotcount="0", hiddenactive
active="false" (default)active="true", the current rowdivider
<app-nav-list-divider />, a hairline between groupslinkComponent
linkComponent: React only, rows are plain linksclassName
class: adds a class to the nav, no visible changeGuidance
What to do, and what to avoid.
Use it when
- A page has a short rail of destinations or groups, each with a count, beside its content.
- The rows pick one current destination, and some rows are coloured by a status dot.
Reach for something else when
- A site's top navigation with dropdown panels. → AppNavigationMenu
- A signed-in app's sidebar of destinations. → AppShell
- A choice between several values in a form. → AppRadioGroup
Reference
Try every prop, read the full list, and check keyboard and screen reader behaviour.
6 props. The 1 most used come first.
Used on most screens 1 props
| Prop | Type | Default | Description |
|---|---|---|---|
| labeldefault required | string | required | The accessible name of the navigation landmark. |
Less common 5 props
| Prop | Type | Default | Description |
|---|---|---|---|
| hrefdefault - | string | - | On a row: where it links. Without it the row is a button. |
| icondefault - | string | - | On a row: a library icon name, drawn at 18 px. Not together with dot-tone. |
| dot-tonedefault - | string | - | On a row: primary, info, success, warning, danger or neutral, a 10 px dot in place of the icon. |
| countdefault - | number | - | On a row: a count on the right; hidden when null or 0. |
| activedefault false | boolean | false | On a row: tints it and sets aria-current="page". |
Screen reader
2 notes- The rows sit in a navigation landmark named by label, and the current row is marked with aria-current page.
- A dot is decorative: the row's label carries the meaning, so the dot is hidden from assistive tech.