Skip to main content

Stat Ring

A circular progress ring component with gradient strokes, mount animations, glow effects, and optional end-cap markers. SVG-based with customizable size, thickness, and colors.

Installation

$ npx shadcn@latest add @orecus/stat-ring
Dependencies:
motion
Registry:
skeleton@orecus/color-utils@orecus/card@orecus/animation

Component

Ring progress indicators in different sizes.

60%
Small
75%
Medium
90%
Large
2,847
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 ring
colorThemeColor'primary'Ring color
size'sm' | 'md' | 'lg''md'Size variant
thicknessnumber—Custom stroke width (overrides size default)
showValuebooleantrueShow value in center
formatValue(value: number, max: number) => string—Custom format function for displayed value
descriptionReactNode—Additional content below the ring
loadingbooleanfalseShows skeleton loading state
cardPropsCardProps—Props to pass to the Card wrapper
classNamestring—Additional CSS classes
variant'default' | 'gradient''default'Ring style variant - 'gradient' uses SVG gradient for the stroke
animatedbooleanfalseAnimate the ring fill on mount
glowbooleanfalseAdd colored glow/shadow effect behind the ring
trackVariant'subtle' | 'dashed''subtle'Background track styling
iconReactNode—Icon to show in center instead of value
showMarkerbooleanfalseShow a marker dot at the ring progress tip
markerGlowbooleanfalseAdd animated pulse glow to the marker
thresholds{ value: number; color: ThemeColor; label?: string }[]—Threshold breakpoints that change ring color based on value ranges