---
title: StepTracker
---

import LibraryInfo from '@theme/LibraryInfo'
import { Feedback, TokensTable, PropsTable } from '../../src/components'
import { StepTracker } from '@telus-uds/components-web'
import { StepTracker as BaseDocs } from 'docs/@telus-uds/components-base'
import AvailableOnBoth from '../../partials/_platform-considerations-both.mdx'

# StepTracker

<LibraryInfo figmaLink="https://www.figma.com/embed?embed_host=share&url=https%3A%2F%2Fwww.figma.com%2Ffile%2F4zJn2Qn6uXOqPP1GVDipy6%2F%25F0%259F%258D%2580-Allium-Components%3Fnode-id%3D4437%253A54816" />

```jsx live
<StepTracker current={1} steps={['First', 'Second', 'Third']} />
```

## Introduction

StepTracker component shows the current position in a sequence of steps. At wide viewports (`lg` and `xl`), all steps are labelled, and the current step is highlighted; at narrower viewports, progress through the steps is shown but only the current step has a visible label.

[Follow the appropriate instructions](importing-components) to add this component in to your app.

### Accessibility

Keep in mind that in its current implementation this is not an interactive
component and can’t be used to navigate between steps. The application
must provide its own navigation mechanism and state control. That is the
main reason the component assumes the `progressbar` role in terms of
accessibility. This also makes it extremely important to make sure you
set the necessary accessibility attributes on controls used to modify the
state of the step tracker.

That said, you can also pass standard a11y props to the `StepTracker`
component, including the ones that are specific to the `progressbar` role.
By default the following props are used:

- `accessibilityRole` (`role`): `progressbar`,
- `accessibilityLabel` (`aria-label`): `Step I of N: <Current Step Label>`,
- `accessibilityLevel` (`aria-level`): 1,
- `accessibilityValue.min` (`aria-valuemin`): `0`,
- `accessibilityValue.max` (`aria-valuemax`): `steps.length - 1`,
- `accessibilityValue.now` (`aria-valuenow`): `current`,
- `accessibilityValue.text` (`aria-valuetext`): `<Current Step Label>`,

### Platform considerations

<AvailableOnBoth />

## Props

<PropsTable base={BaseDocs} />

## Tokens

<TokensTable base={BaseDocs} component="StepTracker" />

## Variants

### Inverse

Use the `inverse` variant to improve legibility and accessibility overall while displaying `StepTracker` on darker backgrounds:

```jsx live
<Box variant={{ background: 'darkest' }} space={3}>
  <StepTracker current={1} steps={['First', 'Second', 'Third']} variant={{ inverse: true }} />
</Box>
```

### Style

#### Bar

Use the `bar` style variant to display a horizontal progress bar with the current step indicated by a filled portion of the bar:

```jsx live
<StepTracker current={1} steps={['First', 'Second', 'Third']} variant={{ style: 'bar' }} />
```

## Feedback

<Feedback component="StepTracker" />
