# Gauge Dial

> 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.

## Spec sheet

| | |
| --- | --- |
| Access | Free: no account, free for commercial use |
| Shelf | Components › Stats |
| Live preview | https://uibrik.com/components/gauge-dial |
| Writes | 1 file into `components/uibrik/gauge-dial/` |
| Packages | `@number-flow/react`, `motion` (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

```bash
npx shadcn@latest add https://uibrik.com/r/gauge-dial.json
```

With the `@uibrik` namespace in `components.json` ([setup](https://uibrik.com/docs/installation.md)): `npx shadcn@latest add @uibrik/gauge-dial`.

Can't run commands? https://uibrik.com/components/gauge-dial/prompt.txt has every file verbatim, with the setup steps, ready for an assistant to write.

## Render it

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

```tsx
import { GaugeDial } from "@/components/uibrik/gauge-dial/gauge-dial";

<GaugeDial
  title="CPU load"
  value={68}
  unit="% used"
  target={80}
  showZone
  interactive
  accent=""
  min={0}
  max={100}
  step={1}
  format={{}}
  onChange={(value) => {}}
  // zones={[{ to: 0, label: "…", status: "good" }]}
/>
```

## Tune it

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

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `title` | `string` | `"CPU load"` | Names what is measured. |
| `value` | `number` | `68` | Current value. The dial follows it with a spring. |
| `unit` | `string` | `"% used"` | Small caption under the number. |
| `target` | `number` | `80` | A level to aim for, marked outside the arc. |
| `showZone` | `boolean` | `true` | Names the zone the value is in, in the card's corner. |
| `interactive` | `boolean` | `true` | Drag the knob or use the arrow keys. |
| `accent` | `string` | `""` | Arc colour. 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` | Value at the start of the sweep. |
| `max` | `number` | `100` | Value at the end of the sweep. |
| `zones` | `{ to: number; label: string; status: "good" \| "warning" \| "critical" }[]` |  | Named ranges, in order. Empty uses healthy, elevated and critical at 60% and 85% of the range. |
| `step` | `number` | `1` | Snap size when dragging or using the keyboard. |
| `format` | `Intl.NumberFormatOptions` | `{}` | Formats the number. |
| `onChange` | `(value: number) => void` |  | Called as the value changes by drag or keyboard. |
| `className` | `string` |  | Classes for the outer shell. |

## Where it fits

- **Targets and thresholds**: A 240-degree dial with a spring-driven knob makes setting a value feel physical. Pairs with [Gauge](https://uibrik.com/components/gauge.md) (Pro).
- **Smart-home controls**: Lit ticks and a zone badge suit thermostats, fans and other device settings. Pairs with [Tactile Toggle](https://uibrik.com/components/tactile-toggle.md).
- **Budget limits**: Dragging or using arrow keys sets a cap precisely while the zone shows if it is safe.

## Same shelf: Stats

- [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.
- [Gauge](https://uibrik.com/components/gauge.md) (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.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/gauge-dial/` so the import paths keep resolving.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
