Skip to content

Gauge

A half-circle meter for one value against a known range: a score, a quota, a target.

Scores

72

0100

99%
81%

Installation

Everything ships in one stylesheet. There is nothing to import per component.

<link rel="stylesheet" href="https://mian.ro/dist/mian.css">

Prefer to own the files? /r/gauge.json is a registry item with this component's CSS and example markup, ready to copy into your project with any tool that reads the open registry-item format.

Class reference

Class / attributeDescription
mn-gaugeThe dial. Set --v from 0 to 100. Takes a colour role.
mn-gauge-valueThe number in the middle.
mn-gauge-smA smaller dial.
mn-gauge-scaleOptional min and max labels under the dial.
--size · --thickWidth of the dial and thickness of its arc.

Accessibility

  • Use role="meter" with aria-valuemin, aria-valuemax, aria-valuenow and a label.
  • Write the value as text inside the dial; the arc repeats it.
  • If colour carries meaning (good, warning, bad), say it in words nearby.
Choose a noodle

Minimal

Flat

Pixel

Linear

Thin

Glass

Textured

Bold

Elegant

Rounded

On this page