Navigation system
The main navigation for an app.
Install
One package and one stylesheet. The stylesheet holds the tokens every component uses.
pnpm add @wolf-rayet/reactimport '@wolf-rayet/react/css/wolf-rayet.css';
import { SideNavigation } from '@wolf-rayet/react';Props
A required prop is marked with an asterisk.
| Prop | Type | Default | Description |
|---|---|---|---|
| sections * | readonly NavSectionProps[] | None | The navigation, grouped. Each section takes an optional heading, its items, and the id of the selected one. |
| label * | string | None | Names the navigation landmark. It matters most when a page has more than one. |
Accessibility
What the component does for you, and what it needs from you.
- The panel is a named navigation landmark, so people can jump to it and tell it apart from other navigation.
- The current item is marked as current rather than only coloured.
- A count beside an item is a badge, so the item itself must carry the number in its accessible name.