VDS

Stepper

A multi-step progress indicator for wizards and forms.

Installation

pnpm install @vds-testing/react @vds-testing/styles
pnpm install @vds-testing/elements @vds-testing/styles

See Installation for CSS setup.

Usage

React:

import {
  Stepper,
  StepperItem,
  StepperTrigger,
  StepperTitle,
  StepperDescription,
  StepperSeparator,
} from "@vds-testing/react"
<Stepper activeStep={0}>
  <StepperItem step={0}>
    <StepperTrigger>1</StepperTrigger>
    <StepperTitle>Step One</StepperTitle>
  </StepperItem>
  <StepperSeparator />
  <StepperItem step={1}>
    <StepperTrigger>2</StepperTrigger>
    <StepperTitle>Step Two</StepperTitle>
  </StepperItem>
</Stepper>

Web Components:

<script type="module">
  import "@vds-testing/elements";
</script>
<vds-stepper active-step="0">
  <vds-stepper-item step="0">
    <vds-stepper-trigger>1</vds-stepper-trigger>
    <vds-stepper-title>Step One</vds-stepper-title>
  </vds-stepper-item>
  <vds-stepper-separator></vds-stepper-separator>
  <vds-stepper-item step="1">
    <vds-stepper-trigger>2</vds-stepper-trigger>
    <vds-stepper-title>Step Two</vds-stepper-title>
  </vds-stepper-item>
</vds-stepper>

Examples

Simple stepper

Simple stepper vertical

Horizontal step row with labels below each indicator (instead of to the right). Separators stay horizontal.

Vertical orientation

Completed steps with checkmark

Show a checkmark icon for completed steps.

Vertical with icons and descriptions

A complete vertical stepper with icons and detailed descriptions.

Props

Stepper

Prop Type Default Description
orientation “horizontal” | “vertical” “horizontal” Layout direction
variant “default” | “simple” “default” simple keeps a horizontal row with labels below each indicator
activeStep number 0 Current active step (0-indexed)
class / className string - Additional CSS classes

Active and completed indicators use --color-brand. Titles use vds-paragraph-strong (black when active, muted gray otherwise); descriptions and indicators use vds-paragraph-s. Triggers use focus-shape.

StepperItem

Prop Type Default Description
step number required Step index (0-indexed)
class / className string - Additional CSS classes

StepperTrigger

Renders as a button.

Prop Type Default Description
class / className string - Additional CSS classes

StepperTitle, StepperDescription

Style components for step labels (vds-paragraph-strong / vds-paragraph-s).

StepperSeparator

Visual connector between steps. Place between StepperItem components. Always light gray; adapts to orientation (horizontal for simple and default horizontal; vertical when orientation="vertical").