Meter

Data display

A measurement within a known range: value between min and max (0 and 100 by default), announced as a meter. Name it with aria-label or aria-labelledby, and set aria-valuetext when the number alone doesn't say it ("312 of 400 hours").

import { Meter } from '@limerdev/zest';
Meter for AI tools (llms.txt)
Use for
Hours used of a budget, storage used, a score.
Don't
How far a running task has come: use Progress.

Examples

Basic

aria-valuetext says what the number means. A class can recolour the indicator.

Budget used 312 of 400 h

Support hours 58 of 60 h

Props

Every part also takes class (merged over its defaults), ref (bindable: the element), children, and child (a snippet that renders your own element, with props to spread on it).

Meter

Prop Type Default Description
max number 100 The maximum value of the meter.
min number 0 The minimum value of the meter.
value number 0 The current value of the meter.