Ballmac UI home

Gauge

New

A half-circle gauge with a needle, colored zones and a target mark. The value, the zone it is in and the target are written as text, and the needle sweeps in once and holds still with reduced motion.

v1.0.0Updated Oct 25, 2026Ships with a test
What changed

72%

Error budget leftHealthyTarget 50%Resets on the 1st

91%

CPU loadAt risk

34%

Quota used

Installation

$ pnpm dlx shadcn@latest add @ballmac/gauge

Usage

import { Gauge } from "@/components/ballmac/gauge"

The full example is in the Code tab above.

Examples

A 0 to 5 score

4.3

Customer satisfactionExcellentTarget 4.5

API reference

PropTypeDefault
value*number—
minnumber0
maxnumber100
zones

Zones from low to high, each with its words. The gauge says which zone the value is in.

GaugeZone[]—
target

A target to mark on the arc.

number—
label*

What is measured, for example "Error budget left".

string—
format

Formats the value and the ends.

(value: number) => string(v) => String(v)
description

A line under the value.

string—

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
Meterrole=meter with label, min, max, now and a text value that includes the zone
ZoneWritten under the value; color only repeats it
MotionThe needle sweep is off with reduced motion

Use with AI

value and label are required; min and max default to 0 and 100. zones is [{ to, label }] from low to high: with zones the arc is colored and the needle is shown, without them the arc fills. target marks a point. format(value) formats the value and ends; description adds a line. It is a role=meter with a spoken value and zone. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Gauge (@ballmac/gauge) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • An error budget, quota, load or score at a glance
  • A KPI with healthy, watch and at-risk bands

Not for

  • Progress toward a finish; use progress or circular-progress
  • Trends; use sparkline

Registry JSON: https://ui.ballmac.com/r/gauge.json

Credits

Free to use in personal and commercial projects.

npm
None

Ballmac UI Pro

Need the whole screen, not one piece?

150 premium blocks (dashboards, settings, calendars, mail, shops, onboarding), a private shadcn registry and Figma tokens. Blocks that show data come with loading, empty and error states built in.

Not ready? Try three Pro blocks free

Leave your email and the blocks appear right here, ready to copy. Yours to use in any project.