xxshna.ui
V 1.1.0Get started ↗
Components/Workflows

Workflow wizards

Guide a user through successive steps with a local state model.

Catalog · 1.1HTML, CSS & optional JSNo runtime dependencies

Live preview

Interactive exampleOpen playground ↗
Step 1 of 3

Account

Confirm your organization profile.

HTML
<div class="xsh-wizard" data-xsh-wizard>
<div class="xsh-wizard__header">Step <output data-xsh-wizard-index>1</output> of 3</div>
<section data-xsh-wizard-step>
<h3>Account</h3>
<p>Confirm your organization profile.</p>
</section>
<section data-xsh-wizard-step hidden>
<h3>Permissions</h3>
<p>Review access before submission.</p>
</section>
<section data-xsh-wizard-step hidden>
<h3>Review</h3>
<p>Ready for your application to submit.</p>
</section>
<div class="xsh-row">
<button class="xsh-button xsh-button--secondary" data-xsh-wizard-prev disabled>Previous</button>
<button class="xsh-button" data-xsh-wizard-next>Continue</button>
</div>
</div>

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-wizardUsed by the example markup and component styles or behavior.
data-xsh-wizard-stepUsed by the example markup and component styles or behavior.
data-xsh-wizard-nextUsed by the example markup and component styles or behavior.
data-xsh-wizard-prevUsed by the example markup and component styles or behavior.

Accessibility & keyboard

Next/Previous move between panels; state and disabled actions stay synchronized.

Implementation note. Implement validation and final submission within the host application.

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.