Skip to content
Vertical Jump Designs-uiFront-End Studio
Get Pro

v3.9 is out.

Navigation

Stepper

Free15.5 KB gzipped

Multi-step progress indicator for wizards and checkout flows, rendered as an ordered list in a labelled group (or a nav when steps are clickable). The current step gets aria-current="step", and every step announces its status as hidden text. Status also shows as marker icon and shape: check (complete), accent ring (current), number (upcoming), alert square (error).

Accessibility: WCAG 2.2 AA · No A or AA violations in light or dark mode · Keys: Tab · Full report

Import

tsx
import { Stepper } from "@vjdesigns/vjdesigns-ui";

Importing only Stepper adds about 15.5 KB of minified, gzipped JavaScript to your app (React not included). The stylesheet is shared by every component and loaded once: 75.1 KB gzipped.

Examples

Checkout

Steps before activeStep are complete. Status is shown with a check or number, not color alone.

  1. Step 1: Cart, Completed
  2. Step 2: Shipping, Current
  3. Step 3: Payment, Not started
  4. Step 4: Review, Not started
tsx
import { useState } from "react";
import { Button, Flex, Stack, Stepper } from "@vjdesigns/vjdesigns-ui";

export function Checkout() {
  const [step, setStep] = useState(1);
  const steps = ["Cart", "Shipping", "Payment", "Review"];
  return (
    <Stack gap={6} style={{ width: "100%" }}>
      <Stepper activeStep={step} onActiveStepChange={setStep} aria-label="Checkout progress">
        {steps.map((title) => (
          <Stepper.Step key={title} title={title} />
        ))}
      </Stepper>
      <Flex gap={3} justify="end">
        <Button variant="ghost" tone="neutral" disabled={step === 0} onClick={() => setStep(step - 1)}>
          Back
        </Button>
        <Button disabled={step === steps.length} onClick={() => setStep(step + 1)}>
          {step >= steps.length - 1 ? "Place order" : "Next"}
        </Button>
      </Flex>
    </Stack>
  );
}

Vertical

orientation="vertical" with descriptions. clickable lets people jump back to finished steps.

tsx
import { Stepper } from "@vjdesigns/vjdesigns-ui";

export function Vertical() {
  return (
    <Stepper orientation="vertical" defaultActiveStep={2} clickable aria-label="Account setup">
      <Stepper.Step title="Create account" description="Email and password" />
      <Stepper.Step title="Verify email" description="Check your inbox" />
      <Stepper.Step title="Invite team" description="Optional, you can skip this" />
      <Stepper.Step title="Start building" />
    </Stepper>
  );
}

Accessibility

Each step's status is announced ("Completed", "Current step") and shown by shape and an icon, not just color. announce reads the new step out when it changes, and aria-label names the stepper.

  1. Step 1: Cart, Completed
  2. Step 2: Shipping, Current
  3. Step 3: Payment, Not started
tsx
import { useState } from "react";
import { Button, Flex, Stack, Stepper } from "@vjdesigns/vjdesigns-ui";

export function Accessibility() {
  const [step, setStep] = useState(1);
  return (
    <Stack gap={5} style={{ width: "100%" }}>
      <Stepper aria-label="Checkout progress" activeStep={step} onActiveStepChange={setStep} announce>
        <Stepper.Step title="Cart" />
        <Stepper.Step title="Shipping" />
        <Stepper.Step title="Payment" />
      </Stepper>
      <Flex gap={3}>
        <Button variant="outline" tone="neutral" disabled={step === 0} onClick={() => setStep((s) => s - 1)}>
          Back
        </Button>
        <Button disabled={step === 2} onClick={() => setStep((s) => s + 1)}>
          Continue
        </Button>
      </Flex>
    </Stack>
  );
}

Translated

The status words and the step-change announcement come from the locale (Brazilian Portuguese here). The step titles are your own text.

  1. Etapa 1: Carrinho, Concluído
  2. Etapa 2: Entrega, Atual
  3. Etapa 3: Pagamento, Não iniciado
tsx
import { Stepper, LocaleProvider } from "@vjdesigns/vjdesigns-ui";
import ptBR from "@vjdesigns/vjdesigns-ui/locales/pt-BR";

export function Translated() {
  return (
    <LocaleProvider locale="pt-BR" messages={ptBR}>
      <Stepper aria-label="Etapas do pedido" defaultActiveStep={1} style={{ width: "100%" }}>
        <Stepper.Step title="Carrinho" />
        <Stepper.Step title="Entrega" />
        <Stepper.Step title="Pagamento" />
      </Stepper>
    </LocaleProvider>
  );
}

Right to left

The first example again, inside a right-to-left LocaleProvider (Arabic). Layout, spacing and arrow icons mirror, and the components' built-in text is translated. The example's own text stays in English.

Checkout

  1. الخطوة 1: Cart, مكتملة
  2. الخطوة 2: Shipping, الحالية
  3. الخطوة 3: Payment, لم تبدأ
  4. الخطوة 4: Review, لم تبدأ
tsx
import { LocaleProvider } from "@vjdesigns/vjdesigns-ui";
import ar from "@vjdesigns/vjdesigns-ui/locales/ar";

// Checkout is the "Checkout" example above.
<LocaleProvider locale="ar" messages={ar}>
  <Checkout />
</LocaleProvider>

API reference

Stepper

Stepper props
PropTypeDefault
activeStep

Index of the active (current) step, zero-based. Controlled. Set it to the number of steps to show every step complete.

number—
defaultActiveStep

Initial active step when uncontrolled.

number0
onActiveStepChange

Called with the new step index when a clickable step is chosen.

(index: number) => void—
orientation

Layout direction. Pass an object to switch at breakpoints (mobile first), e.g. { base: "vertical", md: "horizontal" }. Before hydration the base value is used.

Responsive<Orientation>"horizontal"
size

Marker size, spacing, and type size.

"sm""md""lg""md"
clickable

Makes steps buttons that call onActiveStepChange. In linear mode (the default) only completed steps and the current step can be chosen.

booleanfalse
linear

When false, any step can be chosen in any order (implies clickable). When true, upcoming steps can't be jumped to.

booleantrue
compact

Narrow-width behaviour of a horizontal stepper. See StepperCompact.

falsetrue"auto""auto"
announce

Announce active-step changes in a polite live region ("Step 2 of 4: Shipping"). Leave off when your page already moves focus to the new step's heading, so the change isn't read twice.

booleanfalse
announcement

Builds the live-region text when announce is on.

(info: StepperAnnouncementInfo) => string—
statusLabels

Overrides the screen-reader status text ("Completed", "Current", "Not started", "Error").

StepperStatusLabels—
aria-label

Accessible name for the stepper.

string"Progress"
children

Stepper.Step elements.

ReactNode—
ref

Ref to the root element (a nav when steps are clickable, otherwise a div).

Ref<HTMLElement>—

Also accepts native <div> attributes, plus className, style and ref.

Stepper.Step

One step. Its number and default status come from its position.

Stepper.Step props
PropTypeDefault
titleRequired

Step name, in bold display type. Keep it short ("Shipping", "Payment").

ReactNode—
description

Supporting text under the title. Hidden in compact mode.

ReactNode—
icon

Icon shown in the marker instead of the step number for current and upcoming steps. Decorative. Completed and error steps always show their check and alert icons so status never depends on color.

ReactNode—
status

Overrides the status derived from activeStep (before: complete, at: current, after: upcoming).

"complete""current""upcoming""error"—
disabled

Prevents choosing this step in a clickable stepper.

boolean—
statusLabel

Overrides the screen-reader status text for this step.

string—

Also accepts native <li> attributes, plus className, style and ref.

See what changed in each version in the Changelog.

Accessibility report

Stepper targets WCAG 2.2 AA. Below: a live axe-core audit of this page's examples, Lighthouse scores for the page in both modes, the accessibility behavior built into the component, and the checks only a person can do.

axe-core audit (live)

Running accessibility audit

Checking the examples above…

Lighthouse audit

Light mode

Score 100

35 passed · 0 failed · 30 not applicable · 10 to check by hand

Dark mode

Score 100

35 passed · 0 failed · 30 not applicable · 10 to check by hand

Lighthouse 13.5.0 audits the whole docs page (header and sidebar included), not just the examples, in English. Last run 11/27/2026. Some failed audits carry no weight in the score, so a page can score 100 and still list one.

Built-in behavior

Keyboard

Keyboard
KeyAction
TabInteractive steppers: moves through the step buttons; Enter or Space goes to that step.

Roles and states

Roles and states
ElementRoleStates and properties
Stepperlist (in a group, or a navigation when interactive)aria-label
Steplistitemaria-current="step" on the current one
Live regionstatusAnnounces the step change

Manual checks

Automated tools find roughly a third of accessibility issues. Test these in your app, with your content.

Manual accessibility checks
CheckWhat to testWCAG 2.2
KeyboardEvery action works with Tab, Shift+Tab, Enter, Space and the arrow keys, and focus never gets stuck.2.1.1 (A), 2.1.2 (A)
FocusFocus moves in a logical order, is always visible, and isn't hidden behind sticky headers.2.4.3 (A), 2.4.7 (AA), 2.4.11 (AA), 2.4.13 (AAA)
Screen readersNames, roles and states are announced correctly, and status changes are announced without moving focus.1.3.1 (A), 4.1.2 (A), 4.1.3 (AA)
ColorMeaning never depends on color alone; your own colors meet contrast in both modes.1.4.1 (A), 1.4.3 (AA), 1.4.11 (AA), 1.4.6 (AAA)
Zoom and reflowAt 200% text size and at 320px wide (400% zoom), nothing is cut off and no sideways scrolling is needed.1.4.4 (AA), 1.4.10 (AA), 1.4.12 (AA)
Pointer targetsClick and tap targets are at least 24×24px (44×44px for AAA), or spaced so they don't overlap.2.5.8 (AA), 2.5.5 (AAA)
MotionAnimations respect the reduced-motion setting.2.3.3 (AAA)