Skip to main content

Progress & Meter

Native <progress> and <meter> elements styled by @primus/ui-core. No classes required โ€” just standard HTML attributes.

Preview ยท Progress and Meter

Codeโ€‹

<!-- Basic progress bar -->
<progress value="65" max="100"></progress>

<!-- Colour variants -->
<progress value="28" max="100" class="progress-success"></progress>
<progress value="82" max="100" class="progress-warning"></progress>
<progress value="95" max="100" class="progress-danger"></progress>

<!-- Size variants -->
<progress value="65" max="100" class="progress-sm"></progress> <!-- thin -->
<progress value="65" max="100" class="progress-lg"></progress> <!-- thick -->

<!-- Indeterminate (no value โ€” shows animated stripe) -->
<progress></progress>

<!-- Meter โ€” browser auto-colours based on low/high/optimum -->
<meter value="0.7" min="0" max="1" low="0.3" high="0.7" optimum="1">70%</meter>
<meter value="742" min="300" max="850" low="500" high="700" optimum="850">742</meter>

Progress classesโ€‹

ClassColourUse when
(none)Primary purpleGeneric progress, uploads, steps
progress-successGreenHealthy usage, on-track metrics
progress-warningAmberApproaching limits (75โ€“90%)
progress-dangerRedCritical โ€” limit exceeded (>90%)
progress-smโ€”Thin bar variant
progress-lgโ€”Thick bar variant

Meter vs Progressโ€‹

<progress><meter>
Use forTask completion, upload %Scalar measurements within a range
ColourControlled by classAuto-coloured by low/high/optimum
IndeterminateYes (no value)No
ExamplesUpload 65%, Step 2/4Credit score, disk health, conversion rate
Version history

See the Changelog for version history and breaking changes.