Progress Tracker - React
import { ProgressTracker } from '@sky-uk/ui-core';
Progress Tracker visualises a set of related steps through the user journey.
Progress Tracker should only be used for linear journeys (i.e the checkout process). It should not be used for any non-linear journeys (discovery pages, buy pages, product configuration).
Width of the component is governed by the parent container. Recommended settings are $maxWidth={{ xs: '320px', md: container(6) }}
.
Props
steps
Steps data are provided as an array of objects with a name
property. Maximum recommended number of steps is 4
.
progress
Use progress
property to change the state of the steps and indicate the progress within the user journey.
If there are multiple pages to one step, then you can use decimal number to indicate the percentage progress of the current step.
$appearance
default
light
Translatable Fields
The ProgressTracker
component has visually hidden labels that describe name, state and progress of the steps.
The format of the labels is Name of the step, 1 of 4, state
& N% of step completed
.
These labels could be translated using the the following fields:
progressTracker.roleDescription
- visually hidden label of the component role. Default value isProgress tracker
progressTracker.complete
- visually hidden label of the completed steps. Default value iscomplete
progressTracker.inProgress
- visually hidden label of the in-progress steps. Default value iscurrently in progress
progressTracker.pending
- visually hidden label of the pending steps. Default value isincomplete
progressTracker.stepDivider
- visually hidden label of a divider, e.g.1 of 4
. Default value isof
progressTracker.progressCompleted
- visually hidden label of the progress of a completed step, e.g.50% of step completed
. Default value isof step completed
For more on translatable fields, view the useTranslation
docs here: useTranslation