Navigation and overlays
Steps
Numbered progress through a process with completed, current and error states, descriptions, a vertical layout and tones.
Example
<ol class="steps"><li class="step step-done"><span>Account<span class="step-description">Email and password</span></span></li><li class="step step-done"><span>Workspace<span class="step-description">Name and URL</span></span></li><li class="step step-current" aria-current="step"><span>Invite<span class="step-description">Add your team</span></span></li><li class="step"><span>Launch<span class="step-description">Go live</span></span></li></ol>Classes
10 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 steps. On an <ol> in the example. Sets flex display and text size, and --tone, --tone-fg and --step-size.CSS |
|
| Modifier | Modifier, combined with the steps class. On a <li> in the example. Sets flex display, alignment, gap, width, padding and text style.CSS |
|
| Modifier | Modifier, combined with the steps class. On a <li> in the example. Sets text color, generated content, background and border.CSS |
|
| Modifier | Modifier, combined with the steps class. On a <li> in the example. Sets text color, font weight, border and shadow.CSS |
|
| Part | Part of the steps. Not used in the example above. Sets generated content, text color, background and border.CSS |
|
| Part | Part of the steps. On a <span> in the example. Sets block display, margin, text size, font weight and text color.CSS |
|
| Modifier | Modifier, combined with the steps class. Not used in the example above. Sets alignment, gap, padding, text style, offsets and width.CSS |
|
| Tone | Success tone. Not used in the example above. Sets --tone and --tone-fg.CSS |
|
| Tone | Accent tone. Not used in the example above. Sets --tone and --tone-fg.CSS |
|
| Tone | Neutral tone. Not used in the example above. Sets --tone and --tone-fg.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">
<!-- Steps: start from the base class, then add modifiers -->
<ol class="steps"><li class="step step-done"><span>Account<span class="step-description">Email and password</span></span></li><li class="step step-done"><span>Workspace<span class="step-description">Name and URL</span></span></li><li class="step step-current" aria-current="step"><span>Invite<span class="step-description">Add your team</span></span></li><li class="step"><span>Launch<span class="step-description">Go live</span></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.