Stepper

Multi-step progress indicators for wizards, checkout flows, and onboarding sequences. Supports horizontal, vertical, and clickable variants with built-in state management.

Horizontal Stepper
Account Create your credentials
Profile Personal information
3
Preferences Customize your experience
4
Confirmation Review & submit
Vertical Stepper
Order Placed Your order has been confirmed
2
Processing We're preparing your items
3
Shipped On the way to your address
4
Delivered Package received
Clickable Stepper
Plan Choose a subscription
2
Billing Payment details
Verification Identity check failed

Click any step to navigate directly. The error state on step 3 shows validation feedback.

API Reference

Wiring

import { ref } from 'vue';
import { useStepper } from "@vanduo-oss/vd3";

const root = ref<HTMLElement | null>(null);
const stepper = useStepper(root);   // wires .vd-stepper inside root; cleanup on unmount

// drive it imperatively
stepper.next(stepperEl);
stepper.setStep(stepperEl, 2);

CSS Classes

ClassDescription
.vd-stepperBase container for the stepper component. Renders a horizontal step track by default.
.vd-stepper-verticalModifier that stacks steps vertically with a connecting line on the left.
.vd-stepper-clickableEnables pointer cursor and click-to-navigate behavior on each step.
.vd-stepper-itemIndividual step wrapper. Holds the circle, label, and description.
.vd-stepper-circleCircular indicator showing the step number, check icon, or error icon.
.vd-stepper-labelPrimary text label for the step.
.vd-stepper-descriptionSecondary text below the label providing additional context.
.is-activeMarks the currently active step with primary-colored circle and bold label.
.is-completedMarks a step as finished. Displays a check icon and success styling.
.is-errorMarks a step as having an error. Displays danger color and warning icon.

Composable API

SymbolDescription
useStepper(root)Composable — wires every .vd-stepper inside the root ref; returns an imperative API. Call once in setup().
stepper.next(el) / prev(el)Advance or rewind the given stepper element.
stepper.setStep(el, index)Set the active step (zero-based); earlier steps are marked completed.

Events

EventDescription
stepper:changeFired on the stepper element when the active step changes. event.detail contains { current, previous, total }.
Accessibility
  • The stepper container uses role="list" and each step uses role="listitem" for assistive technology.
  • Active step is announced via aria-current="step".
  • Completed steps convey state through aria-label="Completed" on the circle.
  • Error steps include aria-label="Error" for screen reader feedback.
  • Clickable steppers add tabindex="0" and respond to Enter and Space key presses.
  • Focus order follows the visual step sequence from first to last.