Zephora UI

Other

Gauge

Radial meter: a muted background arc with a colored value arc and the reading centered inside — no needle. Threshold stops recolor the value arc and render as thin bands along the rim; exposes the ARIA meter role.

Import

import { Gauge } from "@zephora/react";

Examples

Basic

The value is clamped into `[min, max]` and rendered in the middle of the arc.

Thresholds and formatValue

The arc adopts the color of the highest threshold at or below the current value; every stop is also drawn as a thin band along the outer rim. `formatValue` formats the centered reading (and `aria-valuetext`).

Custom arc

`startAngle`/`sweep` reshape the arc (0° = 3 o'clock, clockwise) — here a half circle — and `thickness` tunes the ring weight.

API

Gauge props

PropTypeDefaultDescription
value *numberCurrent reading; clamped into [min, max].
minnumber0Lower bound.
maxnumber100Upper bound.
startAnglenumber135Arc start in degrees, 0° = 3 o'clock, clockwise.
sweepnumber270Arc extent in degrees, clockwise from startAngle (capped at 360).
thresholdsArray<{ value: number; color: string }>Color stops: the arc adopts the color of the highest threshold whose value is at or below the current value. Also drawn as thin bands along the outer rim.
showValuebooleantrueRenders the reading in the middle of the arc.
formatValue(value: number) => stringFormats the centered reading (and aria-valuetext).
sizenumber160Overall diameter in px.
thicknessnumber12Arc thickness in px.
aria-labelstring"gauge"Accessible name of the meter.
unstyledbooleanfalseHeadless mode — skips Zephora styling.
…restHTMLAttributes<HTMLDivElement>All native div props are forwarded to the root element.