xxshna.ui
V 1.1.0Get started ↗
Components/Navigation

Steppers

Show progress through a sequence of discrete stages.

Catalog · 1.1HTML, CSS & optional JSNo runtime dependencies

Live preview

Interactive exampleOpen playground ↗
  1. ✓Account
  2. 2Profile
  3. 3Review
HTML
<ol class="xsh-steps" aria-label="Account setup stages">
<li class="xsh-step xsh-step--complete">
<span class="xsh-step__number">✓</span>
<span>Account</span>
</li>
<li class="xsh-step" aria-current="step">
<span class="xsh-step__number">2</span>
<span>Profile</span>
</li>
<li class="xsh-step">
<span class="xsh-step__number">3</span>
<span>Review</span>
</li>
</ol>

Installation & markup

Include the local stylesheet and script once on the page, then place the component inside a data-xsh-ui root. The example above works without a build system.

<link rel="stylesheet" href="/dist/xshna-ui.css">
<div data-xsh-ui>
  <!-- Add the HTML example above -->
</div>
<script defer src="/dist/xshna-ui.js"></script>

Component API

Public classes, attributes and hooks used by this example. Keep the xsh- prefix intact.

IdentifierContract
xsh-stepsUsed by the example markup and component styles or behavior.
xsh-stepUsed by the example markup and component styles or behavior.
xsh-step__numberUsed by the example markup and component styles or behavior.
xsh-step--completeUsed by the example markup and component styles or behavior.
aria-current=stepUsed by the example markup and component styles or behavior.

Accessibility & keyboard

Use an ordered list and aria-current=step for the active stage. The visual stepper itself is informational.

Implementation note. Pair the stepper with actual form navigation controls and validation; never imply the indicator changes application state.

Interaction contract

Behavioral components use the shared delegated runtime; visual-only primitives rely on semantic HTML and CSS. Runtime controls emit bubbling xsh:* CustomEvents; bind application handlers to those events when server persistence, API data or navigation is required.