Gauge

Half-circle gauge: the arc fills on a soft spring, a dot rides its end and the number counts with it. Charts.

Open playground
0%
Health score

About

Gauge is a React component in the Charts category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { Gauge } from "@ashutoshswamy/smoui" and set value, label, size.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

TSX
import { Gauge } from "@ashutoshswamy/smoui";

<Gauge value={72} min={0} max={100} label="Health score" suffix="%" />

Props 3

value / min / max

Range and current value.

numberdefault - / 0 / 100
label / suffix

Caption and unit.

string
size

Width in px.

numberdefault 220