Skip to the content

Steps

Steps is a step trail for multi-step flows: a numbered badge, a connector and a label per step. It is horizontal in wide slots and vertical in narrow ones, with the same anatomy. Only upcoming steps can act as a link or button.
Navigation

When to use

Use when
  • The user moves through ordered stages: onboarding, checkout, a verification-level ladder.
  • The next stage is a call to action and later stages are locked.
Avoid when
  • The sections have no order — use Tabs.
  • You show a single percentage with no named stages — use ProgressBar.

Usage

Each step's status comes from its position and flags. Before currentIndex (or with isComplete) it is complete; at currentIndex it is current; with disabled it is locked. Otherwise it is next, and actionable when it has href, to or onClick.

import { Steps } from '@apollion-dsi/core/data-display/steps';

<Steps
  label="Onboarding steps"
  currentIndex={2}
  steps={[
    { title: 'Personal data' },
    { title: 'Documents' },
    { title: 'Proof of income' },
    { title: 'Review', href: '/onboarding/review' },
  ]}
/>;

Locked steps

disabled locks a step that is not reachable yet: muted badge, no interaction.

<Steps
  currentIndex={0}
  steps={[{ title: 'Unverified' }, { title: 'Silver', href: '/user/verify' }, { title: 'Gold', disabled: true }]}
/>

A step with href renders a native <a>. A step with to renders through linkAs, your router's link component.

import { Link as RouterLink } from 'react-router-dom';

<Steps linkAs={RouterLink} currentIndex={1} steps={[{ title: 'A' }, { title: 'B' }, { title: 'C', to: '/c' }]} />;

Orientation

layout="auto" (the default) follows the width of the slot, not the viewport: below the md container size the trail runs vertical, so a Steps in a narrow column goes vertical on a wide screen too. layout="desktop" and layout="mobile" force one orientation.

StepsBadge, the numbered circle, is exported for custom layouts:

2
3
4

Accessibility

  • The trail is a <nav> named by label. The default name is 'Etapas', so pass label in your page's language.
  • The current step carries aria-current="step"; locked steps carry aria-disabled.
  • The actionable step is a real link or button, reachable by keyboard; focus draws a ring around its badge.

Properties

See also