Gauge preview

Gauge

An SVG arc meter with an animated fill, ticks, coloured bands and a centred readout.

  • Group
    Charts
  • Origin
    Adapted · gauge-ui · source
  • License
    MIT
  • Added
    Oct 22
npx shadcn@latest add @deank/gauge

The registry stays private. Install from the repo with a GitHub token — see the README.

Usage

import { Gauge } from "@/registry/components/gauge/gauge";

<Gauge value={0} label="…" />

Props

PropTypeDefaultDescription
valuenumber
min?number0
max?number100
labelstringVisible label for the reading, also the accessible name
caption?ReactNodeText under the number, e.g. a unit or status
format?(value: number) => string(v) => Math.round(v).toString()Format the centred number
startAngle?number50Gauge degrees clockwise from six o'clock; 40 → 320 leaves a gap at the bottom
endAngle?number310
ticks?number10Number of tick intervals; 0 hides ticks
bands?GaugeBand[]Colour the fill by range, e.g. green / amber / red
thickness?number14
size?number220

When to use

One value against a known range: scores, quotas, utilisation, health, speed.

When not to use

Trends over time (use line-chart); comparing several categories (use bar-chart); values you want users to set (use humidity-dial).

Related

Humidity dial · Line chart · Number ticker