Actions and feedback
Status
A small status dot for presence and health, with an optional ping animation.
Example
<ul class="space-y-2 text-sm">
<li class="flex items-center gap-2"><span class="status status-online status-ping"></span> Online</li>
<li class="flex items-center gap-2"><span class="status status-away"></span> Away</li>
<li class="flex items-center gap-2"><span class="status status-busy"></span> Busy</li>
<li class="flex items-center gap-2"><span class="status status-offline"></span> Offline</li>
<li class="flex items-center gap-2"><span class="status status-info status-xs"></span><span class="status status-info status-sm"></span><span class="status status-info status-md"></span><span class="status status-info status-lg"></span><span class="status status-info status-xl"></span> Sizes</li>
</ul>Classes
19 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 status. On a <span> in the example. Sets inline-block display, alignment, width, height, corner radius and background, and --tone and --status-size.CSS |
|
| Modifier | Modifier, combined with the status class. On a <span> in the example. Sets --tone.CSS |
|
| Modifier | Modifier, combined with the status class. On a <span> in the example. Sets --tone.CSS |
|
| Modifier | Modifier, combined with the status class. On a <span> in the example. Sets --tone.CSS |
|
| Modifier | Modifier, combined with the status class. On a <span> in the example. Sets --tone.CSS |
|
| Modifier | Modifier, combined with the status class. On a <span> in the example. Sets generated content, absolute position, offsets, corner radius, background and animation.CSS |
|
| Size | Extra small size. On a <span> in the example. Sets --status-size.CSS |
|
| Size | Small size. On a <span> in the example. Sets --status-size.CSS |
|
| Size | Medium, the default size. On a <span> in the example. Sets --status-size.CSS |
|
| Size | Large size. On a <span> in the example. Sets --status-size.CSS |
|
| Size | Extra large size. On a <span> in the example. Sets --status-size.CSS |
|
| Tone | Primary tone. Not used in the example above. Sets --tone and --tone-fg.CSS |
|
| Tone | Secondary 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 |
|
| Tone | Success tone. Not used in the example above. Sets --tone and --tone-fg.CSS |
|
| Tone | Warning tone. Not used in the example above. Sets --tone and --tone-fg.CSS |
|
| Tone | Danger tone. Not used in the example above. Sets --tone and --tone-fg.CSS |
|
| Tone | Info tone. On a <span> in the example. 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">
<!-- Status: start from the base class, then add modifiers -->
<ul class="space-y-2 text-sm">
<li class="flex items-center gap-2"><span class="status status-online status-ping"></span> Online</li>
<li class="flex items-center gap-2"><span class="status status-away"></span> Away</li>
<li class="flex items-center gap-2"><span class="status status-busy"></span> Busy</li>
<li class="flex items-center gap-2"><span class="status status-offline"></span> Offline</li>
<li class="flex items-center gap-2"><span class="status status-info status-xs"></span><span class="status status-info status-sm"></span><span class="status status-info status-md"></span><span class="status status-info status-lg"></span><span class="status status-info status-xl"></span> Sizes</li>
</ul>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.