Meter
A bounded measurement, distinct from task progress.
Interactive preview
Usage
import { Meter, Label } from "@devvy-ui/react";
<Label htmlFor="storage">Storage used · 45 of 100 GB</Label>
<Meter id="storage" label="Storage used" value={45} min={0} max={100} low={20} high={80} optimum={10} />API reference
Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:
| Prop | Type | Default | Description |
|---|---|---|---|
| label / value | string / number | required | Accessible measurement name and current value. |
| min / max / low / high / optimum | number | 0 / 1 / native thresholds | Finite bounds and qualitative thresholds. |
Accessibility & behavior
Platform Behavior & Guidelines
Uses native meter for measurements such as capacity. Values/thresholds are normalized to finite bounds; use Progress for an ongoing task. Provide visible units and context, and do not rely on the browser color alone. Native meter props and refs are forwarded.
Source ownership
Run npx @devvy-ui/cli init once in your React project, then add the source:
npx @devvy-ui/cli add meterMake the source yours.
Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.
Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.