ScoreGauge

data-display

Circular SVG gauge with score value, label, and optional trend indicator. Three sizes (sm/md/lg) and four status colors (default/good/warning/critical). Full Stitch→Penpot→Tokens→Code pipeline product.

Import

typescript
import { ScoreGauge } from "packages/ui/src";

Props

ScoreGaugeProps

PropTypeRequired
scorenumberYes
labelstringYes
sizesm|md|lgNo
statusdefault|good|warning|criticalNo
trendup|down|flatNo
trendValuestringNo

Examples

Component Showcase

Score Gauge

Circular SVG gauge with score value, label, trend indicator, and status colors. First component to complete the full 5-stage pipeline including Penpot normalization.

Sizes

Three size variants: sm (80px), md (120px), lg (200px). All token-driven.

85

Small

size="sm"
72

Medium

-3%
size="md"
94

Large

+12%
size="lg"

Status Variants

Four status colors mapped to token overrides: default (teal), good (green), warning (amber), critical (red).

75

Default

92

Good

+8%
55

Warning

stable
23

Critical

-14%

Dashboard Grid

Six operational health gauges arranged in a responsive grid. Each gauge maps to a real-world service metric with live trend indicators.

99

Uptime

+0.2%
72

Latency

-15ms
34

Error Rate

+1.2%
88

Throughput

+340 rps
61

Saturation

stable
97

Availability

+0.5%

Pipeline Origin

ScoreGauge is the first component to complete all 5 stages of the design-to-code pipeline, including the Penpot normalization step.

1

Research

Brain queried for gauge requirements

2

Design

Stitch MCP generated 'Deep Metric' design system

3

Normalize

Penpot MCP: frame + component registered

4

Tokens

14 scoreGauge tokens added (236 total)

5

Implement

ScoreGauge.tsx: SVG ring, 3 sizes, 4 statuses

Metadata

Component Metadata
Familydata-display
FrameworksNext.js, Astro/EmDash
DescriptionCircular SVG gauge with score value, label, and optional trend indicator. Three sizes (sm/md/lg) and four status colors (default/good/warning/critical). Full Stitch→Penpot→Tokens→Code pipeline product.
PropsScoreGaugeProps (score: number, label: string, size?: sm|md|lg, status?: default|good|warning|critical, trend?: up|down|flat, trendValue?: string)
Statesdefault, good, warning, critical
A11y
  • SVG ring is aria-hidden
  • Score value is visible text
  • Trend arrows use aria-hidden with text fallback
Responsive
  • Inline-flex, scales with container
  • Size prop controls diameter (80/120/200)
Motion
  • stroke-dasharray transition 400ms ease
Token Dependencies
  • components.scoreGauge.trackColor
  • components.scoreGauge.fillDefault
  • components.scoreGauge.fillGood
  • components.scoreGauge.fillWarning
  • components.scoreGauge.fillCritical
  • components.scoreGauge.scoreColor
  • components.scoreGauge.labelColor
  • components.scoreGauge.trendUpColor
  • components.scoreGauge.trendDownColor
  • components.scoreGauge.trendFlatColor
  • components.scoreGauge.background
  • components.scoreGauge.borderRadius
  • components.scoreGauge.strokeWidth
  • components.scoreGauge.glowOpacity
Content Slotslabel (string), trendValue (string)
CMS Bindings
  • Score from CMS number field
  • Label from CMS string field
Test Cases
  • Renders score and label
  • Clamps score to 0-100
  • Applies size class
  • Applies status class
  • Shows trend indicator