Welcome to Vanilla Breeze
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
Displays a scalar measurement within a known range, like a gauge. The meter automatically changes color based on whether the value is in the optimum, suboptimum, or poor range.
Use progress instead for tasks that are in progress (like file uploads or loading states).
A simple meter showing a value within a range.
<label>Storage Used</label><meter value="0.7" min="0" max="1">70%</meter> <label>Battery Level</label><meter value="85" min="0" max="100">85%</meter>
| Attribute | Purpose | Default |
|---|---|---|
value |
Current value (required) | - |
min |
Minimum possible value | 0 |
max |
Maximum possible value | 1 |
low |
Upper bound of low range | min |
high |
Lower bound of high range | max |
optimum |
Optimal value (affects color) | midpoint |
The meter's color changes automatically based on where the value falls relative to the optimum attribute. Set optimum low for "less is better" metrics (CPU, disk usage) or high for "more is better" metrics (skills, scores). No classes or JavaScript needed — the browser handles the color logic.
<!-- Low optimum (lower is better, like CPU/disk usage) --><meter value="22" min="0" max="100" low="40" high="75" optimum="20">22%</meter> <!-- High optimum (higher is better, like skills/score) --><meter value="9" min="0" max="10" low="4" high="7" optimum="10">9/10</meter>
Different heights for various contexts.
<meter class="xs" value="0.6">60%</meter><meter class="s" value="0.6">60%</meter><meter value="0.6">60%</meter> <!-- default --><meter class="l" value="0.6">60%</meter>
Use the .labeled wrapper pattern for meters with value displays.
<section class="labeled"> <label> <span>Storage</span> <span>14.3 GB / 20 GB</span> </label> <meter value="14.3" min="0" max="20">71.5%</meter></section>
| Use meter | Use progress |
|---|---|
| Static measurements | Tasks in progress |
| Disk space, battery level | File uploads, loading |
| Has optimum value ranges | Has determinate/indeterminate states |
| Gauge-like display | Progress bar display |
/* Tokens (defined in src/tokens/forms.css) */:root { --meter-h: var(--size-s); --progress-track-bg: var(--color-surface-raised);} meter { appearance: none; display: block; inline-size: 100%; block-size: var(--meter-h); border: none; border-radius: var(--radius-full); overflow: hidden; background: var(--progress-track-bg);} /* WebKit/Blink meter styling */meter::-webkit-meter-bar { background: var(--progress-track-bg); border-radius: var(--radius-full); border: none;} /* Semantic colors via tokens */meter::-webkit-meter-optimum-value { background: var(--color-success); }meter::-webkit-meter-suboptimum-value { background: var(--color-warning); }meter::-webkit-meter-even-less-good-value { background: var(--color-error); } /* Size variants */meter.xs { block-size: var(--size-3xs); }meter.s { block-size: var(--size-2xs); }meter.m { block-size: var(--size-s); }meter.l { block-size: var(--size-m); } /* Segmented meter */meter.segmented { background: repeating-linear-gradient( 90deg, var(--progress-track-bg), var(--progress-track-bg) 9%, var(--color-surface) 9%, var(--color-surface) 10% );}