Skip to contentWolf-Rayet

Progress tracker

A progress tracker shows the steps in a process and how far the user has got.

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 { ProgressTracker } from '@wolf-rayet/react';

Props

A required prop is marked with an asterisk.

PropTypeDefaultDescription
items *readonly Stage[]NoneThe stages in order. Each one needs an id, a label and a status of visited, current, unvisited or disabled. Exactly one stage should be current.

Accessibility

What the component does for you, and what it needs from you.

  • The tracker is an ordered list, so screen readers announce the number of stages and the position of each one.
  • Status is in the markup as well as the colour, so the current stage is announced, not only shown.
  • A disabled stage is announced as unavailable instead of skipped, so people still hear every stage.