Internal ID software / Navigation
Navigation
The way around an app: a named list of links with the current page marked.
Not drawn in Figma: built only from the tokens, for internal ID software. In code: components/software/navigation.tsx. From the old system: Navigation in @id-identity-as/ui/chrome (the list of links, without the public site chrome).
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
label (required) | string | The name of the navigation, read aloud. | |
items (required) | NavigationItem[] | { href, label, current? }. current marks the page the reader is on. | |
orientation | 'vertical' | 'horizontal' | 'vertical' | Vertical is a list down the side of an app. Horizontal is a row that wraps. |
as | ElementType | 'a' | The element to render a link with. |
Do
- Name every navigation: "Hovedmenu", "Indstillinger".
- Set it in the first two or three columns of the grid, with the page in the rest.
- On a phone, put a vertical navigation in a Drawer.
Do not
- Do not mark the current page with a colour. It is underlined and set in the heading weight.
- Do not use it for the public site. Its navigation and footer wait for Figma.
Accessibility
- The current page has aria-current="page".
- Two navigations on one page have two different names.
Tokens it uses
- color.text.default
- type.body.md
- type.heading.md
- space.inline.2
- space.inline.3
- space.inline.5