Stepper Overview

A stepper shows the steps of a multi-step flow, such as an application form, and which step the user is on. It is a controlled indicator: the app sets activeStep, and each step's progress (completed, current or upcoming) follows from its position. The stepper renders no step panels, no Next or Back buttons and no validation; those stay in the app and its form engine.

When to Use

✅ Use a stepper when:

  • A form is split into a few ordered steps and users benefit from seeing where they are
  • A step needs to show that it has an error or a warning, for example after a review page sends the user back
  • A long flow needs a step list beside the form (use the vertical orientation)

❌ Don't use a stepper for:

  • Navigation between independent sections (use tabs or a side navigation)
  • Progress of a single task, such as an upload (use a progress bar)
Examples Default stepper

Wrap the steps in dap-ds-stepper-item elements and set the zero-based activeStep on the stepper. Steps before it are completed and show a check, steps after it are upcoming and show their number.

Step status

A step can carry a status of success, warning or error. The status icon replaces the step's number or check, the current step keeps its ring, and a visually hidden word announces the status, so it never relies on color alone.

Clickable steps

With clickable="true" every step is a button named "Go to step N: label". Activating a step fires dds-step-click with the step's index; the stepper does not change activeStep itself, so the app decides whether the user may go there. A disabled step stays focusable with aria-disabled="true" and never fires the event.

const stepper = document.querySelector('#clickable-stepper')
stepper.addEventListener('dds-step-click', event => {
  stepper.activeStep = event.detail.index
})
Compact view

When a horizontal stepper's own width is below 36rem (576px at the default font size), it switches to a compact view: the labels and descriptions are hidden visually, the indicators stay on one track, and a "Step N of M: label" line names the current step. The switch is a CSS container query on the stepper, so it follows the space the stepper gets, not the viewport. Every step keeps its accessible name, its status word and, when clickable, its button. The threshold is fixed, because container query conditions cannot read CSS custom properties. A horizontal stepper is a CSS size container (container-type: inline-size), so it takes its width from its parent and not from its content: inside a flex row, give it a width.

Vertical

Set orientation="vertical" to stack the steps. Each step's label and description sit beside its indicator, and the connectors run down between the indicators. Use it for long flows with more steps than fit on one row, or for a step list in a side column next to the form. A vertical stepper never switches to the compact view, whatever its width, so every label stays visible. Statuses, the current step's ring, disabled steps and clickable steps work as in the horizontal stepper, and the accessibility semantics are the same. The layout uses logical properties, so it mirrors under dir="rtl". An unknown orientation value is treated as horizontal.

Custom Styling

Each step exposes the indicator, connector, label, description and button parts, and the colors are custom properties on dap-ds-stepper-item.

dap-ds-stepper-item {
  --dds-stepper-item-accent-color: var(--dds-background-positive-base-inverted);
  --dds-stepper-item-indicator-size: 40px;
}

dap-ds-stepper-item::part(label) {
  text-transform: uppercase;
}
Accessibility Features
  • The stepper is a list named by its label (default: a localized "Steps"), and each step is a list item.
  • Only the current step carries aria-current="step".
  • Completed steps carry a visually hidden "completed", and a status adds its own word ("success", "warning" or "error").
  • Clickable steps are native buttons named "Go to step N: label", followed by the status word; the step's description describes the button.
  • Disabled clickable steps stay in the tab order with aria-disabled="true", so keyboard and screen reader users can still find them and read why they are unavailable.
  • All default texts exist in English, Hungarian and German.
Importing Per-component import (Recommended)

Import the component by its own subpath. This registers <dap-ds-stepper> (and the components it renders internally) and lets your bundler include only what you use:

import 'dap-design-system/components/stepper'

Need a reference to the class (e.g. to register it manually or extend it)? The same subpath default-exports it:

import DapDSStepper from 'dap-design-system/components/stepper'
Register everything

Register the whole library at once — convenient, but pulls every component into your bundle:

import 'dap-design-system'
Importing React
import { DapDSStepperReact } from 'dap-design-system/react'
Attributes
PropertyTypeDefaultDescription
activeStepnumber0The zero-based index of the current step. Steps before it are completed, steps after it are upcoming.
clickable'true', 'false' , booleanfalseWhether the steps are buttons that fire dds-step-click.
labelstring, undefinedThe accessible name of the step list. Defaults to a localized "Steps".
orientation'horizontal', 'vertical''horizontal'The direction of the steps. A vertical stepper puts each label beside its indicator and never switches to the compact view. An unknown value is treated as horizontal. Default is horizontal.
ariaLabelstring, nullnullAccessible label for the element. Use this to provide a text alternative
for elements that don't have visible text content.
ariaExpanded'true', 'false'nullIndicates whether the element is expanded or collapsed.
ariaControlsstring, nullnullIdentifies the element that is controlled by this element.
ariaHasPopupstring, nullnullIndicates the availability and type of interactive popup element.
ariaDescribedBystring, nullnullIdentifies the element that describes the current element.
ariaPressed'true', 'false' , 'mixed'nullIndicates the current "pressed" state of toggle buttons.
ariaHidden'true', 'false'nullIndicates whether the element is hidden from accessibility APIs.
customStylesstring, undefinedCustom CSS text to be merged with the component's styles.
This CSS will be injected into the shadow DOM and merged with the component's static styles.
Slots
NameDescription
(default)The `dap-ds-stepper-item` elements, in order.
Events
Event NameDescriptionType
dds-step-clickFired when the user activates an enabled step of a clickable stepper. It does not change `activeStep`; the app does.{index: number }
CSS Parts
Part NameDescription
baseThe main stepper container.
listThe list that holds the steps.
summaryThe "Step N of M: label" line shown in the compact view of a horizontal stepper.
How to Use CSS Parts

You can style CSS parts using the ::part() pseudo-element selector:

/* Target a specific part */
.my-custom-dap-ds-stepper::part(base) {
  /* Your custom styles */
}

/* Target multiple parts */
.my-custom-dap-ds-stepper::part(base),
.my-custom-dap-ds-stepper::part(list) {
  /* Shared styles */
}

Example usage:

<dap-ds-stepper class="my-custom-dap-ds-stepper">
  Stepper
</dap-ds-stepper>
.my-custom-dap-ds-stepper::part(base) {
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

CSS parts allow you to style internal elements of the component while maintaining encapsulation. Learn more in our styling guide.

CSS Custom Properties
Property NameDescription
--dds-stepper-summary-colorColor of the compact summary line. (default: var(--dds-text-neutral-strong))
--dds-stepper-summary-font-sizeFont size of the compact summary line. (default: var(--dds-font-base))
How to Use CSS Custom Properties

CSS custom properties (CSS variables) can be set directly on the component or in your stylesheet:

Method 1: Inline styles (Quick customization)

<dap-ds-stepper
  style="--dds-stepper-summary-color: value; --dds-stepper-summary-font-size: value;">
  Stepper
</dap-ds-stepper>

Method 2: CSS classes (Reusable styles)

.my-custom-dap-ds-stepper {
  --dds-stepper-summary-color: value;
  --dds-stepper-summary-font-size: value;
}
<dap-ds-stepper class="my-custom-dap-ds-stepper">
  Stepper
</dap-ds-stepper>

Method 3: Global theme customization

/* Apply to all instances */
dap-ds-stepper {
  --dds-stepper-summary-color: value;
  --dds-stepper-summary-font-size: value;
}

CSS custom properties inherit through the Shadow DOM, making them perfect for theming. Changes apply immediately without rebuilding.

Components Stepper item <dap-ds-stepper-item/> Attributes
PropertyTypeDefaultDescription
labelstring''The label of the step.
descriptionstring, undefinedSupporting text shown below the label.
status'success', 'warning' , 'error'The status of the step, shown with an icon and a visually hidden word.
disabled'true', 'false' , booleanfalseWhether the step is disabled. A disabled step in a clickable stepper stays
focusable with aria-disabled and never fires dds-step-click.
ariaLabelstring, nullnullAccessible label for the element. Use this to provide a text alternative
for elements that don't have visible text content.
ariaExpanded'true', 'false'nullIndicates whether the element is expanded or collapsed.
ariaControlsstring, nullnullIdentifies the element that is controlled by this element.
ariaHasPopupstring, nullnullIndicates the availability and type of interactive popup element.
ariaDescribedBystring, nullnullIdentifies the element that describes the current element.
ariaPressed'true', 'false' , 'mixed'nullIndicates the current "pressed" state of toggle buttons.
ariaHidden'true', 'false'nullIndicates whether the element is hidden from accessibility APIs.
customStylesstring, undefinedCustom CSS text to be merged with the component's styles.
This CSS will be injected into the shadow DOM and merged with the component's static styles.
Slots

No slots available.

Events

No custom events available.

CSS Parts
Part NameDescription
baseThe main stepper item container.
buttonThe button that wraps the step content when the stepper is clickable.
indicatorThe circle that shows the step number, a check or the status icon.
connectorThe line that connects the indicator to the next step.
labelThe label of the step.
descriptionThe description of the step.
CSS Custom Properties
Property NameDescription
--dds-stepper-item-indicator-sizeSize of the indicator circle. (default: var(--dds-spacing-800))
--dds-stepper-item-connector-thicknessThickness of the connector line. (default: var(--dds-border-width-large))
--dds-stepper-item-gapGap between the indicator and the text: below the indicator row in a horizontal stepper, beside the indicator in a vertical one. (default: var(--dds-spacing-200))
--dds-stepper-item-label-colorColor of the label. (default: var(--dds-text-neutral-strong))
--dds-stepper-item-description-colorColor of the description. (default: var(--dds-text-neutral-subtle))
--dds-stepper-item-accent-colorColor of the current and completed indicators and of the completed connector. (default: var(--dds-background-brand-base-inverted))
--dds-stepper-item-track-colorColor of the upcoming indicator border and connector. (default: var(--dds-border-neutral-base))