Charts
Gauge
Speedometer-style semicircle gauge โ displays a single value within a range with colour feedback.
Quick Preview
72%
PerformanceInstallation
# No extra dependencies โ uses SVG
// Copy component fromsrc/components/charts/Gauge.tsx
Usage
import Gauge from '@/components/charts/Gauge'const scoreSegments = [{ value: 60, color: '#F45A5A' },{ value: 100, color: '#D94040' },]<Gaugevalue={72}max={100}label="Health"unit="%"size={160}strokeWidth={14}trackColor="rgba(244, 90, 90, 0.14)"segments={scoreSegments}/>
Examples
Interactive Speedometer
65km/h
SpeedSystem Dashboard
43%
CPU67%
Memory23%
Disk89%
GPUThreshold Segments
94%
Service HealthSize Variants
72
Small72
Default72
LargePrompt Preview
Copy a prompt that recreates this UI
Use this prompt to ask AI for a production-ready Gauge that matches the reference styling, API surface, and interaction polish.
Copy-ready AI prompt
Starts from the current visual reference and project constraints.
Tweak only product-specific copy or data after the first generation pass.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
value* | number | - | Current value |
max | number | 100 | Maximum value |
size | number | 160 | Diameter in px |
strokeWidth | number | 14 | Thickness of the gauge arc |
color | string | '#F45A5A' | Base colour for the progress arc. Default colour enables semantic thresholds. |
trackColor | string | 'rgba(15, 23, 42, 0.10)' | Track colour behind the progress arc |
label | string | - | Label below gauge |
unit | string | - | Unit suffix (e.g. "%" or " km/h") |
segments | { value: number; color: string }[] | - | Optional thresholds that map ranges to colours |
className | string | - | Additional wrapper classes |