Workflow wizards
Guide a user through successive steps with a local state model.
Live preview
Account
Confirm your organization profile.
Permissions
Review access before submission.
Review
Ready for your application to submit.
<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.
| Identifier | Contract |
|---|---|
xsh-wizard | Used by the example markup and component styles or behavior. |
data-xsh-wizard-step | Used by the example markup and component styles or behavior. |
data-xsh-wizard-next | Used by the example markup and component styles or behavior. |
data-xsh-wizard-prev | Used by the example markup and component styles or behavior. |
Accessibility & keyboard
Next/Previous move between panels; state and disabled actions stay synchronized.
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.