Navigation and overlays
Stepper
A segmented progress bar with a title and description under each segment, for multi page forms.
Example
<ol class="stepper"><li class="stepper-item stepper-done"><span class="stepper-title">Shipping</span><span class="stepper-description">Address and delivery</span></li><li class="stepper-item stepper-current" aria-current="step"><span class="stepper-title">Payment</span><span class="stepper-description">Card or invoice</span></li><li class="stepper-item"><span class="stepper-title">Review</span><span class="stepper-description">Check and confirm</span></li></ol>Classes
6 classes. Click a name to copy it. Utilities on the same element always win over component defaults, so any of them can be adjusted with plain utility classes.
| Class | Type | What it does |
|---|---|---|
| Base | Base class of the stepper. On an <ol> in the example. Sets grid display, grid tracks and gap, and --tone and --tone-fg.CSS |
|
| Modifier | Modifier, combined with the stepper class. On a <li> in the example. Sets flex display, alignment, gap, text size, text color and corner radius.CSS |
|
| Modifier | Modifier, combined with the stepper class. On a <li> in the example. Sets background and text color.CSS |
|
| Modifier | Modifier, combined with the stepper class. On a <li> in the example. Sets background and text color.CSS |
|
| Part | Part of the stepper. On a <span> in the example. Sets font weight.CSS |
|
| Part | Part of the stepper. On a <span> in the example. Sets text size, text style and hidden by default.CSS |
Usage
Components ship inside the same stylesheet as the utilities. There is nothing else to install and no script to load: link Monsoon and write the markup.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/monsooncss">
<!-- Stepper: start from the base class, then add modifiers -->
<ol class="stepper"><li class="stepper-item stepper-done"><span class="stepper-title">Shipping</span><span class="stepper-description">Address and delivery</span></li><li class="stepper-item stepper-current" aria-current="step"><span class="stepper-title">Payment</span><span class="stepper-description">Card or invoice</span></li><li class="stepper-item"><span class="stepper-title">Review</span><span class="stepper-description">Check and confirm</span></li></ol>Theme it with --seed on any ancestor, for example style="--seed: #0d9488", and force a scheme with class="dark" or class="light" on a wrapper.
Accessibility
- Every interactive part shows a visible focus ring with
:focus-visible, and tone colors pair with-foregroundtokens that keep text at 4.5:1 or better in light and dark mode.