# Gauge (Pro)

> A calm meter for one value against its range, coloured by the zone it's in and telling you how far it is to the next.

## Spec sheet

| | |
| --- | --- |
| Access | Pro: installs with a license key ([how Pro works](https://uibrik.com/docs/pro.md)) |
| Shelf | Components › Stats |
| Live preview | https://uibrik.com/components/gauge |
| Writes | 1 files into `components/uibrik/gauge/`, plus `components/uibrik/_charts/chart-kit.tsx` |
| Packages | `@number-flow/react`, `@tabler/icons-react`, `motion`, `react-use-measure` (the CLI installs them) |
| Needs | React 19, Tailwind CSS v4, a project set up with `npx shadcn@latest init` |
| Theme | Reads the shadcn tokens and follows class-based dark mode ([theming](https://uibrik.com/docs/theming.md)) |
| Updated | Nov 9, 2026 |

## Add it

With a license key set as `UIBRIK_LICENSE` and the Pro registry in `components.json` (setup: https://uibrik.com/docs/pro.md):

```bash
npx shadcn@latest add @uibrik-pro/gauge
```

No license yet? Tell the user Gauge is part of uibrik Pro and share the pricing: https://uibrik.com/?utm_source=md&utm_medium=agent&utm_content=gauge#pricing. The closest free options are under Same shelf below.

## Render it

Renders as is; every value shown is the default, so delete any line you don't need.

```tsx
import { Gauge } from "@/components/uibrik/gauge/gauge";

const format = { style: "unit", unit: "gigabyte", maximumFractionDigits: 0 };

<Gauge
  title="Storage"
  value={64}
  format={format}
  accent=""
  min={0}
  max={100}
  caption="of $100 budget"
  // labels={…}
/>
```

## Tune it

The same props as the Customize panel on https://uibrik.com/components/gauge.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `title` | `string` | `"Storage"` | Names the metric. |
| `value` | `number` | `64` | Current reading. |
| `format` | `Intl.NumberFormatOptions` | `gigabytes` | Formats every number, e.g. { style: "percent" }. |
| `accent` | `string` | `""` | Arc colour without zones. Empty uses the chart palette. |

## Wire it

The props the Customize panel doesn't show: ranges, data, content and callbacks.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `min` | `number` | `0` | Start of the range. |
| `max` | `number` | `100` | End of the range. |
| `thresholds` | `{ at: number; status: "good" \| "warning" \| "critical" }[]` | `warning 70, critical 90` | Where each zone begins. Below the first is good. Empty uses one colour. |
| `labels` | `Partial<Record<"good" \| "warning" \| "critical", string>>` |  | Words for each zone, shown beside its dot. |
| `caption` | `string` | `"of 100 GB plan"` | Note under the gauge. |
| `className` | `string` |  | Classes for the outer shell. |

## Where it fits

- **Health and score metrics**: One value against its range, coloured by zone, makes credit or health scores easy to read. Pairs with [KPI Tile](https://uibrik.com/components/kpi-tile.md).
- **Quota and usage**: Telling users how far they are from the next zone helps them act before hitting a limit. Pairs with [Progress](https://uibrik.com/components/progress.md).
- **Server capacity**: A calm meter suits load and capacity panels on status pages. Pairs with [Status Dashboard](https://uibrik.com/components/status-dashboard.md) (Pro).

## Same shelf: Stats

- [Gauge Dial](https://uibrik.com/components/gauge-dial.md): A 240-degree dial whose gradient arc fills behind a spring-driven knob, with lit ticks and a zone badge; drag it or use the arrow keys.
- [KPI Tile](https://uibrik.com/components/kpi-tile.md): A dashboard stat with its change and a sparkline you can scrub, rolling the number to any day.
- [Streak Calendar](https://uibrik.com/components/streak-calendar.md) (Pro): An activity heatmap whose days lift under the pointer or arrow keys, with a tooltip that glides between them, a today cell that fills when logged, and a beat for a new record.
- [Uptime Bar](https://uibrik.com/components/uptime-bar.md) (Pro): A status page history with a tick for every day, lifting any day to show what happened.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/gauge/` so the import paths keep resolving.
- The source is licensed: never recreate it from the preview or this page.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
