Actions and feedback
Radial progress
A circular progress ring drawn with a conic gradient and driven by the --value custom property.
Example
<div class="flex flex-wrap items-center gap-4">
<div class="radial-progress" style="--value: 72" role="progressbar" aria-valuenow="72" aria-valuemin="0" aria-valuemax="100">72%</div>
<div class="radial-progress radial-progress-success radial-progress-lg" style="--value: 90" role="progressbar" aria-valuenow="90" aria-valuemin="0" aria-valuemax="100">90%</div>
<div class="radial-progress radial-progress-warning radial-progress-sm" style="--value: 40" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100">40</div>
<div class="radial-progress radial-progress-danger radial-progress-xs" style="--value: 15" role="progressbar" aria-valuenow="15" aria-valuemin="0" aria-valuemax="100"></div>
<div class="radial-progress radial-progress-info radial-progress-xl" style="--value: 58; --thickness: 0.5rem" role="progressbar" aria-valuenow="58" aria-valuemin="0" aria-valuemax="100">58%</div>
</div>Classes
14 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 radial progress. On a <div> in the example. Sets inline-grid display, alignment, width, height, corner radius and text color, and 7 custom properties.CSS |
|
| Size | Extra small size. On a <div> in the example. Sets --size.CSS |
|
| Size | Small size. On a <div> in the example. Sets --size.CSS |
|
| Size | Medium, the default size. Not used in the example above. Sets --size.CSS |
|
| Size | Large size. On a <div> in the example. Sets --size.CSS |
|
| Size | Extra large size. On a <div> in the example. Sets --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. On a <div> in the example. Sets --tone and --tone-fg.CSS |
|
| Tone | Warning tone. On a <div> in the example. Sets --tone and --tone-fg.CSS |
|
| Tone | Danger tone. On a <div> in the example. Sets --tone and --tone-fg.CSS |
|
| Tone | Info tone. On a <div> 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">
<!-- Radial progress: start from the base class, then add modifiers -->
<div class="flex flex-wrap items-center gap-4">
<div class="radial-progress" style="--value: 72" role="progressbar" aria-valuenow="72" aria-valuemin="0" aria-valuemax="100">72%</div>
<div class="radial-progress radial-progress-success radial-progress-lg" style="--value: 90" role="progressbar" aria-valuenow="90" aria-valuemin="0" aria-valuemax="100">90%</div>
<div class="radial-progress radial-progress-warning radial-progress-sm" style="--value: 40" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100">40</div>
<div class="radial-progress radial-progress-danger radial-progress-xs" style="--value: 15" role="progressbar" aria-valuenow="15" aria-valuemin="0" aria-valuemax="100"></div>
<div class="radial-progress radial-progress-info radial-progress-xl" style="--value: 58; --thickness: 0.5rem" role="progressbar" aria-valuenow="58" aria-valuemin="0" aria-valuemax="100">58%</div>
</div>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.