Gauge

PreviousNext

A flexible, animated gauge component with support for full, half, and quarter circle types, gradients, multi-rings, thresholds, tick marks, and glow effects.

gauge-default

gauge-tickmark

gauge-rings

gauge-half

Installation

pnpm dlx shadcn@latest add https://ui.dalim.in/r/styles/default/gauge.json

Usage

import { Gauge } from "@/components/ui/gauge"
<Awards
  variant="award"
  title="WINNER"
  subtitle="A Design Award & Competetion"
  recipient="Ali Imam"
  date="June 2025"
  level="gold"
/>

API Reference

Gauge

A flexible, animated gauge component with support for full, half, and quarter circle types, gradients, multi-rings, thresholds, tick marks, and glow effects.

PropTypeDefaultDescription
valuenumberCurrent value to display on the gauge.
sizenumber | string150Size of the SVG gauge.
gapPercentnumber5Gap between primary and secondary strokes (as a percentage).
strokeWidthnumber10Stroke thickness of the gauge arc.
equalbooleanfalseMakes primary and secondary arcs equal in length.
showValuebooleantrueWhether to display the numeric value inside the gauge.
showPercentagebooleanfalseWhether to append the unit (e.g., %) next to the value.
primary"danger" | "warning" | "success" | "info" | string | { [key: number]: string }Primary stroke color or threshold-based mapping.
secondary"danger" | "warning" | "success" | "info" | string | { [key: number]: string }Secondary stroke color or threshold-based mapping.
gradientbooleanfalseApplies a gradient fill to the primary stroke.
multiRing{ enabled: boolean; rings?: Array<{ value: number; color: string; strokeWidth?: number; opacity?: number }> }Renders multiple concentric rings around the gauge.
thresholdsArray<{ value: number; color: string; label?: string }>Threshold markers with color indicators.
gaugeType"full" | "half" | "quarter""full"Shape of the gauge arc.
transition{ length?: number; step?: number; delay?: number }{ length: 1000, step: 200, delay: 0 }Transition settings for animation.
classNamestring |Tailwind/CSS classes for styling different gauge elements.
labelstringLabel text displayed under the gauge value.
unitstring"%"Unit appended to the value when showPercentage is true.
minnumber0Minimum value of the gauge.
maxnumber100Maximum value of the gauge.
tickMarksbooleanfalseDisplays tick marks along the arc.
glowEffectbooleanfalseApplies a glow effect to the gauge stroke.