FORMA Docs

Gauge

Show a value against a known range.

import { Gauge } from "@/forma/arc/gauge/gauge";
Base

In FORMA

  • Liegt in kit/arc/gauge und ist über @/forma/arc/gauge/gauge erreichbar.
  • Farbe, Ecken, Höhen, Abstände, Tiefe, Schrift und Tempo kommen aus der Richtung (core/arc-bridge.ts); Arc behält Verhalten, Tastatur und Federn.

When to use

  • One value against a known range, such as disk quota or health score.
  • Values with labelled bands, like Healthy, Filling up, and Critical.

When not to use

  • Use progress for task completion.
  • Use usage-meter for plan limits and activity-rings for several goals at once.

Usage

import { Gauge } from "@/forma/arc/gauge/gauge";

export function DiskUsage() {
  return (
    <Gauge
      label="Disk usage"
      value={72}
      detail="360 of 500 GB"
      thresholds={[
        { from: 0, tone: "success", label: "Healthy" },
        { from: 70, tone: "warning", label: "Filling up" },
        { from: 90, tone: "danger", label: "Critical" },
      ]}
    />
  );
}

API reference

Gauge

A 270 degree ring meter with a percent readout and optional labelled threshold bands.

PropTypeDefaultDescription
value (required)number–Current value within min and max.
minnumber0Lower bound.
maxnumber100Upper bound.
label (required)string–What is measured.
detailstring–Secondary caption line.
tone"accent" | "success" | "warning" | "danger""accent"Ring color when no threshold applies.
thresholds{ from: number; tone: "accent" | "success" | "warning" | "danger"; label: string }[]–Bands by starting value. The highest band reached sets the tone and shows its label.

Accessibility

  • The ring is role="meter" with aria-valuemin, aria-valuemax, aria-valuenow, and an aria-valuetext including the band label.
  • Threshold labels name the state in text, so it never rests on color alone.
  • The SVG and animated readout are aria-hidden.

Motion

  • The ring fills once when half in view without overshoot, then springs to new values while the percent counts.
  • The band color and label change exactly as the count crosses a threshold.
  • Reduced motion lands on the value at once.

Responsive behavior

  • The ring is min(100%, 176px) wide and keeps its aspect ratio, so it shrinks in narrow columns.

Performance

  • It fills once when half in view, then springs to new values; it is one SVG arc with no running loop.

Notes for AI

  • Use for one value against a known range, such as quota or health. Use progress for task completion and usage-meter for plan limits.
  • Always add thresholds with labels when tone carries meaning.

Also in charts

  • Line chart: A multi-series line chart with a gliding crosshair, legend toggles, and paths that morph between ranges.
  • Bar chart: Compare one measure across days and scrub any bar for its value.
  • Donut chart: A donut whose arcs morph between datasets, with the active value rolling into the center.
  • Streamgraph: Layered streams on a wiggle baseline that morph between ranges, with a layer you can isolate and read week by week.
  • Brush chart: A dense time series with an overview strip: drag a window to zoom, resize it by its handles, and read events in place.
  • Waffle chart: A ten by ten unit chart where every cell is one percent, and cells fly to their new group when the data changes.
  • Slope chart: Before and after on two axes: lines draw in, rank moves sit beside each value, and switching datasets slides every line to its new slope.
  • Sparkline: Show a compact trend beside a value.
  • Activity heatmap: See a year of activity at a glance, one square per day.
  • Animated counter: Give changing totals a clear sense of movement.
  • Ridgeline: Overlapping distributions, one ridge per group: hover to lift a ridge and read its quartiles, switch datasets and every curve morphs.
  • Treemap: A squarified treemap: click to drill and the tiles grow to fill the view, with a breadcrumb back and metrics that morph every tile.
  • Split bar: A single 100% bar split into shares: rest on a segment to widen it and read its exact figures, toggle segments from the legend and the rest reflow, with labels inside when they fit and on leader lines when they don't.

Guidance for AI tools

Gauge: Show a value against a known range. Follow the declared prop types and do not invent props. Keep keyboard access, reduced motion support, and both light and dark themes intact when adapting it.

Full library index: https://uiarc.dev/llms.txt

Komponente und Text: Arc UI (MIT, uiarc.dev), angepasst für FORMA.