Skip to main content

Stat Gauge

A semi-circular arc gauge with gradient strokes, range zones, mount animations, and glow effects. SVG-based with customizable size, thickness, and colors.

Installation

$ npx shadcn@latest add @orecus/stat-gauge
Dependencies:
motion
Registry:
skeleton@orecus/color-utils@orecus/card@orecus/use-reduced-motion@orecus/use-animated-number@orecus/animation

Component

Semi-circular arc gauges in different sizes.

Small
Medium
Large
Active Users
Out of 5,000 capacity
System Health
All systems operational

Props

PropTypeDefaultDescription
value*number—Current value (0 to max)
maxnumber100Maximum value
label*string—Label text below the gauge
colorThemeColor'primary'Gauge color
ranges{ value: number; color: ThemeColor; label?: string }[]—Background qualitative range zones sorted ascending. Auto-derives progress color.
showValuebooleantrueShow value in the gauge center
formatValue(value: number, max: number) => string—Custom format function for displayed value
descriptionReactNode—Additional description text
size'sm' | 'md' | 'lg''md'Size variant
thicknessnumber—Custom stroke width (overrides size default)
variant'default' | 'gradient''default'Gauge fill style
animatedbooleanfalseAnimate gauge fill on mount
glowbooleanfalseGlow effect on gauge arc
animateValuebooleantrueNumber counting animation
iconReactNode—Icon to show instead of value
showMarkerbooleanfalseShow marker dot at progress tip
markerGlowbooleanfalseAdd animated pulse glow to the marker
loadingbooleanfalseShows skeleton loading state
cardPropsCardProps—Props to pass to the Card wrapper
classNamestring—Additional CSS classes