Add this component

npx zentauri-ui add gauge

Accessibility notes

Keyboard accessible by default with semantic markup, visible focus treatment, and tokenized states. Add descriptive labels for icon-only or decorative usage.

Dependency notes

Check Installation for shared peers. This component keeps styling in Tailwind classes and the --zui-* token contract.

Feedback

Gauge for radial progress and dial metrics

Gauge turns determinate values into a compact circular visualization. Choose a complete radial ring or an open dial while retaining real meter semantics, explicit ranges, labels, and readable values.

72%Storage
84%Performance
38%Quota

Gauge variants playground

Tune the value, appearance, size, thickness, and arc style. Use radial for a complete progress ring or dial for an open 270-degree meter.


64%Completion

All appearances

Select a gauge to load its appearance into the playground.

Gauge API

Generated from the package prop types and variant definitions.

Gauge

GaugeProps

Variants

PropTypeDefault
appearance
amberbluecyandefaultdestructiveemeraldglassgradient-bluegradient-emeraldgradient-roseinforose+5
default
size
lgmdsmxlxs
md
thickness
mediumthickthin
medium
variant
dialradial
radial

State

PropTypeDefault
valuenumber | undefinednone

Behavior

PropTypeDefault
formatValue((value: number, percentage: number) => string) | undefinednone
labelstring | undefinednone
maxnumber | undefinednone
minnumber | undefinednone
showValueboolean | undefinednone

Content

PropTypeDefault
childrenReactNodenone
Inherited HTML props
PropTypeDefault
classNamestring | undefinednone
idstring | undefinednone
onClickMouseEventHandler<HTMLDivElement> | undefinednone
styleCSSProperties | undefinednone
titlestring | undefinednone

GaugeVariant

GaugeVariantProps

Behavior

PropTypeDefault
appearance'default' | 'blue' | 'cyan' | 'slate' | 'rose' | 'emerald' | 'gradient-blue' | 'violet' | 'amber' | 'glass' | 'success' | 'warning' | 'info' | 'secondary' | 'destructive' | 'gradient-rose' | 'gradient-emerald' | null | undefinednone
size'md' | 'sm' | 'lg' | 'xl' | 'xs' | null | undefinednone
thickness'medium' | 'thin' | 'thick' | null | undefinednone
variant'radial' | 'dial' | null | undefinednone
CSS variable overrides

Gauge CSS variables

Override these gauge variables on :root, a theme selector, or a component wrapper.

46 variables

Pattern: --zui-<component>-<slot?>-<variant?>-<property>-<state?>-dark?

:root {
  --zui-gauge-value-fg: oklch(20.8% 0.042 265.755);
  --zui-gauge-label-fg: #64748b;
  --zui-gauge-track: #e2e8f0;
  --zui-gauge-default-fill: oklch(20.8% 0.042 265.755);
  --zui-gauge-secondary-fill: #64748b;
  --zui-gauge-destructive-fill: #dc2626;
  --zui-gauge-success-fill: #16a34a;
  --zui-gauge-warning-fill: #d97706;
  --zui-gauge-info-fill: #0284c7;
  --zui-gauge-blue-fill: #2563eb;
  --zui-gauge-cyan-fill: #0891b2;
  --zui-gauge-emerald-fill: #059669;
  --zui-gauge-violet-fill: #7c3aed;
  --zui-gauge-rose-fill: #e11d48;
  --zui-gauge-amber-fill: #d97706;
  --zui-gauge-slate-fill: #475569;
  --zui-gauge-gradient-blue-from: #2563eb;
  --zui-gauge-gradient-blue-to: #06b6d4;
  --zui-gauge-gradient-emerald-from: #059669;
  --zui-gauge-gradient-emerald-to: #84cc16;
  --zui-gauge-gradient-rose-from: #e11d48;
  --zui-gauge-gradient-rose-to: #d946ef;
  --zui-gauge-glass-fill: #64748b;
}

/* Dark theme variables follow the same names with -dark appended. */
.dark {
  --zui-gauge-value-fg-dark: oklch(98.4% 0.003 247.858);
  --zui-gauge-label-fg-dark: #94a3b8;
  /* ...same variables with -dark at the end */
}

What it does

Gauge maps a value within a configurable range onto an SVG arc. Values outside that range are clamped so the graphic and accessible meter state remain aligned.

Radial and dial variants

Use the default radial variant for a complete 360-degree ring. Choose the dial variant for a rounded 270-degree arc with an open lower edge, which reads naturally for performance and capacity metrics.

Common use cases

  • Dashboard KPIs such as capacity, utilization, and health scores.
  • Storage, quota, and resource-consumption summaries.
  • Performance, speed, and quality dials.
  • Compact completion indicators where a linear bar does not fit.

Accessibility

The visible percentage is not the only source of meaning. Gauge exposes meter semantics, the numeric range, current value, a readable value string, and an accessible label on the root.

Next.js integration notes

Gauge is exported from its own client entry and has no Framer Motion dependency. Import it from @zentauri-ui/zentauri-components/ui/gauge in an App Router client subtree or render it through a server component boundary.

FAQ

How is Gauge different from Progress?

Gauge presents a determinate value as a circular ring or open dial and uses meter semantics. Progress remains the linear progress-bar primitive for task completion.

Can Gauge use a custom range and value format?

Yes. Set min and max for the range and use formatValue to render units, scores, storage values, or another readable string. The same text is exposed to assistive technology.

Is the Gauge component accessible?

The root uses role='meter' with minimum, maximum, current, and textual values. Supply a concise label that describes the measured quantity.