- Docs
- Components
- Interface
- Data & Media
- Instrument Dial
Stats on hairline dials that sweep in like a mechanical needle
| Name | Type | Default | Description |
|---|---|---|---|
stats | DialStat[] | uptime, latency, requests | The dials. Each stat is { label, value, min?, max?, prefix?, unit?, decimals? }. min and max set the scale (0 to 100 unless given). |
variant | "gauge" | "chrono" | "meter" | "gauge" | Gauge is a 270° scale, chrono a full circle like a watch sub-dial, meter a half circle. |
ticks | number | 101 / 60 / 51 | Number of tick marks on the scale. The default depends on the variant. |
majorEvery | number | 10 / 5 | Every nth tick is drawn longer, and carries a numeral when numerals is on. |
numerals | boolean | false | Prints scale values outside the major ticks. |
hand | boolean | true | Shows a pointer at the current value. |
trail | number | 0.55 | How much the lit ticks fade towards the start of the scale. 0 lights them all evenly. |
size | number | 240 | Largest width of one dial in pixels. Dials shrink and wrap in narrow containers. |
gap | number | 32 | Space between dials in pixels. |
theme | "auto" | "light" | "dark" | "auto" | Auto picks light or dark colours from the background behind the dials. |
accentColor | string | theme violet | Colour of the lit ticks. |
trackColor | string | from theme | Colour of the unlit ticks. |
textColor | string | from theme | Colour of the values and the pointer. |
duration | number | 1600 | Roughly how long a sweep takes to settle, in milliseconds. |
bounce | number | 0.3 | How far the pointer overshoots before it settles, like a mechanical needle. 0 glides straight in. |
stagger | number | 140 | Delay between dials starting their sweep, in milliseconds. |
motion | "sweep" | "tick" | "sweep" | Sweep moves smoothly. Tick jumps from mark to mark like a ratchet. |
live | boolean | false | Keeps the values drifting slightly around their targets, like a live reading. |
liveAmount | number | 0.02 | How far live values drift, as a share of the scale. |
replayOnClick | boolean | true | Clicking a dial (or pressing Enter on it) drops the pointer and sweeps it back in. |
ref | { replay } | — | Replays every dial, for example when a section scrolls back into view. |
className | string | — | Classes for the root element. |
style | CSSProperties | — | Inline styles for the root element. |
statsDialStat[]The dials. Each stat is { label, value, min?, max?, prefix?, unit?, decimals? }. min and max set the scale (0 to 100 unless given).
uptime, latency, requestsvariant"gauge" | "chrono" | "meter"Gauge is a 270° scale, chrono a full circle like a watch sub-dial, meter a half circle.
"gauge"ticksnumberNumber of tick marks on the scale. The default depends on the variant.
101 / 60 / 51majorEverynumberEvery nth tick is drawn longer, and carries a numeral when numerals is on.
10 / 5numeralsbooleanPrints scale values outside the major ticks.
falsehandbooleanShows a pointer at the current value.
truetrailnumberHow much the lit ticks fade towards the start of the scale. 0 lights them all evenly.
0.55sizenumberLargest width of one dial in pixels. Dials shrink and wrap in narrow containers.
240gapnumberSpace between dials in pixels.
32theme"auto" | "light" | "dark"Auto picks light or dark colours from the background behind the dials.
"auto"accentColorstringColour of the lit ticks.
theme violettrackColorstringColour of the unlit ticks.
from themetextColorstringColour of the values and the pointer.
from themedurationnumberRoughly how long a sweep takes to settle, in milliseconds.
1600bouncenumberHow far the pointer overshoots before it settles, like a mechanical needle. 0 glides straight in.
0.3staggernumberDelay between dials starting their sweep, in milliseconds.
140motion"sweep" | "tick"Sweep moves smoothly. Tick jumps from mark to mark like a ratchet.
"sweep"livebooleanKeeps the values drifting slightly around their targets, like a live reading.
falseliveAmountnumberHow far live values drift, as a share of the scale.
0.02replayOnClickbooleanClicking a dial (or pressing Enter on it) drops the pointer and sweeps it back in.
trueref{ replay }Replays every dial, for example when a section scrolls back into view.
—classNamestringClasses for the root element.
—styleCSSPropertiesInline styles for the root element.
—