Gauge

A dial for a value within a known range.

Memory
x

Installation

  1. Add the registryOnce per project
  2. Add gauge

Usage

A gauge is a Meter drawn as an arc, for a measurement within a range that reads at a glance, such as on a dashboard. Its children sit in the middle of the arc.

Composition

Examples

Arcs

startAngle and endAngle set where the arc begins and ends, in degrees clockwise from the top. The gauge is only as big as its arc, so a semicircle takes half the height of a circle, and its children sit toward the open side, at the bottom of a semicircle over the top.

Storage
x
Memory
x
Bandwidth
x

Formatted value

GaugeValue shows a percentage by default. Pass format to format the value itself with Intl.NumberFormat, or a function as the children of GaugeValue to format it yourself. Set max when the range isn't 0 to 100.

of 10 GB
x
p95 latency
x

Colors

Recolor the indicator by targeting its data-slot from the root.

Build minutes
x
Bandwidth
x
Requests
x

Thresholds

Choose the color from the value to warn as it climbs. The arc eases to each new value, unless the reader prefers reduced motion.

CPU
x

Sizes

size sets the diameter and thickness the width of the arc, both in pixels, and a thickness of half the size or more fills the gauge in like a pie. Size the text to fit, and leave out the label on a small gauge, naming it with aria-label instead.

x
Storage
x
Storage
x

Compact

Without children, a small gauge sits in a line of text, as in a list of resources.

  • x
    postgres-primary82%
  • x
    redis-cache37%
  • x
    analytics-replica12%

Props

The tables leave out className, style and render. Parts built on Base UI take them as its styling and composition guides describe.

Gauge

GaugeValue