Skip to content
IndexRequest a UIAboutContact

Radial Gauge Meter

A semicircle gauge whose arc and colour follow a value slider through healthy, warning and critical ranges.

Open alone ↗

AI prompt

PROMPT: PASTE INTO YOUR AI CODING TOOL
Design a semicircle gauge for "CPU load". An SVG arc with round caps shows the value from 0 to 100 as a stroke-dasharray on a path with pathLength 100, track in light grey. Large centred number with a percent sign (tabular numerals) and a status word beneath (Healthy below 60, Warning from 60 to 85, Critical above 85); stroke colour green, amber or red accordingly with sufficient contrast. Tick labels 0 and 100 at the arc ends. Make it accessible with role meter, aria-valuemin 0, aria-valuemax 100, aria-valuenow and an aria-label. A range slider below sets the value for testing. Arc transitions over 400 milliseconds with ease-out; prefers-reduced-motion removes the transition. Plain HTML, CSS and JavaScript with inline SVG.

About this pattern

Definition

A gauge shows one value against a range as an arc. Colour bands tell people at a glance whether the value is within a healthy, warning or critical range.

Purpose & UX principles

  • Best for a single KPI with known limits: CPU load, budget used, battery, capacity.
  • Always show the number as text as well; never rely on arc length or colour alone.
  • Choose thresholds by meaning (for example below 60 healthy, 60 to 85 warning, above 85 critical) and label them.

Interaction states

  • Healthy (green), warning (amber), critical (red); the value is announced via role meter.

Motion specification

  • The arc animates to the new value over 400ms with ease-out; colour changes at the thresholds.
  • Reduced motion: the arc jumps to the value.

Responsive behaviour

  • The gauge scales with its container; keep the number at least 24px.
  • On narrow screens put the status text below the number.

Code

HTML
<div class="bx"><div class="gg" id="gg" role="meter" aria-label="CPU load" aria-valuemin="0" aria-valuemax="100" aria-valuenow="42"><svg viewBox="0 0 200 120" aria-hidden="true"><path class="tr" pathLength="100" d="M20 100A80 80 0 0 1 180 100"/><path class="ar" id="ar" pathLength="100" d="M20 100A80 80 0 0 1 180 100"/><text x="14" y="116" class="lb">0</text><text x="186" y="116" class="lb" text-anchor="end">100</text></svg><div class="nm"><b id="nv">42%</b><span id="st">Healthy</span></div></div>
<label class="ctl">Load <input id="vl" type="range" min="0" max="100" value="42"></label></div>

Related patterns

Donut Chart with Linked Legend

↗
Donut Chart with Linked LegendData Visualization

Number Count Up

↗
Number Count UpData Visualization

Sparkline Trend Rows

↗
Sparkline Trend RowsData Visualization