DesignOverviewDesign SystemMapsGraphIntroductionInstallationDeriving a themeSandboxTheme builderVisual testingAgentsCortexMemoryActiveProvenanceActiveContextActiveServicesInsightsGet in touchSource on GitHub
Loading the reference
MeterView sourceEdit in SandboxView MarkdownCopy MarkdownOpen in ClaudeOpen in CursorA measurement in a known range, with optional bands that mark it good, fair, or poor.Also called Gauge, Level, and Capacity.StableSince 0.1.0FeedbackImportimport'@fusion.dev/helix/meter'import'@fusion.dev/helix-headless/meter'Preview
GuidelinesWhen to use
A measurement in a known range, such as disk used or a battery level.Shares of a whole in one bar, such as storage by file type.MeterThis page
Write a Meter.Segment for each share of the whole.The meter measures their sum.
Set low, high, and optimum to mark bands of the range.low and high divide the range into a low, a middle, and a high band, and optimum sets the preferred one.
Anatomy
1::part(track)The whole range.
2::part(indicator)The part of the track the value fills.
3::part(value)OptionalThe reading as text, shown when show-value is set.
API referenceRoothelix-meterA measurement in a known range, with optional bands that mark it good, fair, or poor.
PropTypeDescriptionband"fair"|"good"|"poor"Sets the band directly, for a rule that low, high, and optimum cannot
express.bandLabelsPartial<Record<MeterBand, string>>Default{ fair: "Fair", good: "Good", poor: "Poor" }The words each band is said with under live, by its name, written as
JSON in the attribute: band-labels='{"poor":"Almost full"}'.emphasis"subtle"How strongly the reading is drawn. subtle draws it as a wash of its color.formatOptionsIntl.NumberFormatOptionsIntl.NumberFormat options the reading is written with, as React Aria's
Meter and ProgressBar take them: a unit, a currency, or a number of
decimals. Written as JSON in the attribute.highnumberBottom of the high band.labelstringDefault""Accessible name for the reading.livebooleanDefaultfalseSays the reading in a polite live region each time it moves into
another band, with the band's word, such as "92%, Poor".liveLabelstringDefault"{reading}, {band}"What live says as the reading moves into another band. {reading} is
the reading as it is shown, and {band} the band's words from
band-labels.localestringDefault""The locale the words and the percentage are in, such as fr for 72 %.lownumberTop of the low band.maxnumberDefault100Top of the range.minnumberDefault0Bottom of the range.optimumnumberThe point in the range where the reading is best.shape"arc"|"ring"Whether the reading is drawn as a bar, a ring, or an arc.showValuebooleanDefaultfalseWhether the reading is shown beside the bar.valuenumberDefault0Where the reading sits between min and max.valueTextstringDefault""Text that screen readers announce and the meter shows for the reading, in
place of the percentage.
ReadTypeDescriptionwhenSettledPromise<void>Resolves a frame after the first update, when transitions are switched on.
SlotDescription(default)Meter.Segment elements, one for each share of the whole, drawn in the bar.labelA visible label, above a bar and under a ring or an arc. Its words name it in place of label.
EventTypeDescriptionhelix-bandHelixBandEventFired when the reading moves into another band, with the band it is in now, or '' where it is in none. Not sent on the first render, since a meter that arrives in a band has not moved.
PartDescriptiongrooveThe unfilled circle, in ring and arc.indicatorThe part of the track the value fills.indicator-fairThe fill while the reading is in a band next to the good band. Set alongside indicator.indicator-goodThe fill while the reading is in the good band. Set alongside indicator.indicator-overThe fill while the value is above max. Set alongside indicator.indicator-poorThe fill while the reading is two bands from the good band. Set alongside indicator.indicator-underThe fill while the value is below min. Set alongside indicator.liveA polite region that says the reading as it moves into another band, under live, rendered from the first time it does. Hide it visually.tickA mark at low or at high.trackThe whole range.valueThe reading as text, shown when show-value is set.
CSS PropertyDescription--meter-alongWhere a bound sits on the arc, as a length along it.--meter-atWhere a bound sits on a linear track, as a percentage.--meter-colorThe fill color. Overrides the band's tone.--meter-count-durationHow long the number shown under show-value takes to count to a new value. Unset, it changes at once.--meter-count-easingThe curve the number shown counts along.--meter-fractionThe value as a fraction of the range, 0 to 1.--meter-label-colorThe color of a slotted label.--meter-label-gapThe space between a slotted label and the meter.--meter-label-sizeThe type size of a slotted label.--meter-ring-sizeThe width and height of the drawing in ring and arc.--meter-ring-widthThe thickness of the stroke in ring and arc.--meter-sizeThe thickness of the bar.--meter-spanHow much the range holds, max less min, which a segment divides its own value by to find its width.--meter-sweepHow much of the circle the arc covers, as a path length.--meter-tick-colorThe color of the mark at each threshold.--meter-track-colorThe color of the groove behind the fill.--meter-transition-durationHow long the fill takes to move to a new reading, and to change its color. 0s moves it at once.--meter-value-colorThe color of the reading shown under show-value.--meter-value-gapThe space between the bar and the reading under show-value.--meter-value-sizeThe type size of the reading shown under show-value.
Custom stateDescriptionfairThe reading is in a band next to the good band.goodThe reading is in the good band.overThe value is above max.poorThe reading is two bands from the good band.settledSet one frame after the first render. Transitions wait for it, so an element does not animate its own arrival.underThe value is below min.
Segmenthelix-meter-segmentExperimentalOne share of a meter's whole, drawn as a slice of its bar.
PropTypeDescriptionlabelstringDefault""What the segment is, such as "Tools", which names the slice when a pointer
rests on it.tone"accent"|"danger"|"info"|"neutral"|"primary"|"success"|"warning"What the segment means, as it does on a callout. Takes the tone's color in
place of the next color in the series.valuenumberDefault0How much of the meter's range the segment takes, in the units of the meter's
min and max.
ReadTypeDescriptionwhenSettledPromise<void>Resolves a frame after the first update, when transitions are switched on.
SlotDescription(default)Nothing. A segment draws its share and has no content.
PartDescriptionfillThe slice of the bar the segment takes.
CSS PropertyDescription--meter-segment-colorThe slice's color. Overrides the series and the tone.--meter-segment-gap-colorThe color of the hairline between neighbors.--meter-segment-valueHow much of the range the segment takes, in the meter's own units.
Custom stateDescriptionsettledSet one frame after the first render. Transitions wait for it, so an element does not animate its own arrival.
Roothelix-headless-meterA measurement in a known range, with optional bands that mark it good, fair, or poor.
PropTypeDescriptionband"fair"|"good"|"poor"Sets the band directly, for a rule that low, high, and optimum cannot
express.bandLabelsPartial<Record<MeterBand, string>>Default{ fair: "Fair", good: "Good", poor: "Poor" }The words each band is said with under live, by its name, written as
JSON in the attribute: band-labels='{"poor":"Almost full"}'.formatOptionsIntl.NumberFormatOptionsIntl.NumberFormat options the reading is written with, as React Aria's
Meter and ProgressBar take them: a unit, a currency, or a number of
decimals. Written as JSON in the attribute.highnumberBottom of the high band.labelstringDefault""Accessible name for the reading.livebooleanDefaultfalseSays the reading in a polite live region each time it moves into
another band, with the band's word, such as "92%, Poor".liveLabelstringDefault"{reading}, {band}"What live says as the reading moves into another band. {reading} is
the reading as it is shown, and {band} the band's words from
band-labels.localestringDefault""The locale the words and the percentage are in, such as fr for 72 %.lownumberTop of the low band.maxnumberDefault100Top of the range.minnumberDefault0Bottom of the range.optimumnumberThe point in the range where the reading is best.shape"arc"|"ring"Whether the reading is drawn as a bar, a ring, or an arc.showValuebooleanDefaultfalseWhether the reading is shown beside the bar.valuenumberDefault0Where the reading sits between min and max.valueTextstringDefault""Text that screen readers announce and the meter shows for the reading, in
place of the percentage.
ReadTypeDescriptionwhenSettledPromise<void>Resolves a frame after the first update, when transitions are switched on.
SlotDescription(default)Meter.Segment elements, one for each share of the whole, drawn in the bar.labelA visible label. Its words name the meter in place of label.
EventTypeDescriptionhelix-bandHelixBandEventFired when the reading moves into another band, with the band it is in now, or '' where it is in none. Not sent on the first render, since a meter that arrives in a band has not moved.
PartDescriptiongrooveThe unfilled circle, in ring and arc.indicatorThe part of the track the value fills.indicator-fairThe fill while the reading is in a band next to the good band. Set alongside indicator.indicator-goodThe fill while the reading is in the good band. Set alongside indicator.indicator-overThe fill while the value is above max. Set alongside indicator.indicator-poorThe fill while the reading is two bands from the good band. Set alongside indicator.indicator-underThe fill while the value is below min. Set alongside indicator.liveA polite region that says the reading as it moves into another band, under live, rendered from the first time it does. Hide it visually.tickA mark at low or at high.trackThe whole range, or the drawing in ring and arc.valueThe reading as text, shown when show-value is set.
CSS PropertyDescription--meter-alongWhere a bound sits on the arc, as a length along it.--meter-atWhere a bound sits on a linear track, as a percentage.--meter-count-durationHow long the number shown under show-value takes to count to a new value. Unset, it changes at once.--meter-count-easingThe curve the number shown counts along.--meter-fractionThe value as a fraction of the range, 0 to 1.--meter-spanHow much the range holds, max less min, which a segment divides its own value by to find its width.--meter-sweepHow much of the circle the arc covers, as a path length.
Custom stateDescriptionfairThe reading is in a band next to the good band.goodThe reading is in the good band.overThe value is above max.poorThe reading is two bands from the good band.settledSet one frame after the first render. Transitions wait for it, so an element does not animate its own arrival.underThe value is below min.
Segmenthelix-headless-meter-segmentExperimentalOne share of a meter's whole, drawn as a slice of its bar.
PropTypeDescriptionlabelstringDefault""What the segment is, such as "Tools", which names the slice when a pointer
rests on it.valuenumberDefault0How much of the meter's range the segment takes, in the units of the meter's
min and max.
ReadTypeDescriptionwhenSettledPromise<void>Resolves a frame after the first update, when transitions are switched on.
SlotDescription(default)Nothing. A segment draws its share and has no content.
PartDescriptionfillThe slice of the bar the segment takes.
CSS PropertyDescription--meter-segment-valueHow much of the range the segment takes, in the meter's own units.
Custom stateDescriptionsettledSet one frame after the first render. Transitions wait for it, so an element does not animate its own arrival.
Examples
NameDescriptionCountingA shown reading that counts to the new one as the fill moves.EmphasisOne meter at full strength and two with subtle emphasis, for readings that give context.LabelA visible label above the bar and under the ring, whose words also name the meter.Offset rangeA range from 15 to 30, for a reading that never goes near zero.Over maxA value at the maximum and a value past it. The bar stops at its end.PreviewA measurement in a known range, with its value shown.PreviewA measurement in a known range, with its value shown.RangesThree disk readings colored by the same low, high, and optimum, then a temperature in its good band, one above it, and the same high reading set to poor with band.SegmentsA context window split into what fills it, one segment a source.ShapeMeters drawn as an arc and as a ring.Value textA reading shown as words you write with value-text, and a reading written in a unit with format-options, which takes Intl.NumberFormat options.