Skip to contentWolf-Rayet

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/react
import '@wolf-rayet/react/css/wolf-rayet.css';
import { SideNavigation } from '@wolf-rayet/react';

Props

A required prop is marked with an asterisk.

PropTypeDefaultDescription
sections *readonly NavSectionProps[]NoneThe navigation, grouped. Each section takes an optional heading, its items, and the id of the selected one.
label *stringNoneNames 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.