v0.3.1 StableFoundation ComponentReact 18 & 19Zero Runtime CSS

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:

PropTypeDefaultDescription
label / valuestring / numberrequiredAccessible measurement name and current value.
min / max / low / high / optimumnumber0 / 1 / native thresholdsFinite 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 meter

Make 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.

Meter.tsxREACT / TSX

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.