Gauge
An aesthetic and customizable circular visual component for React.
Installation
npm install @suyalcinkaya/gauge
yarn add @suyalcinkaya/gauge
pnpm install @suyalcinkaya/gauge
bun add @suyalcinkaya/gauge
Default
Label
Display the value inside the Gauge with the showValue
prop.
Variant
The ascending
variant (default) is useful for cases like tracking the percentage of a goal *achieved*. The descending
variant is useful for cases like tracking the percentage of a goal *remaining*.
Animation
On initial render, the showAnimation
prop animates the Gauge from 0 to the value
for the ascending
variant, and from 100 to the value
for the descending
variant.
Default color scale
Custom color scale
Custom secondary color
Arc priority
When displaying half ratio (51 > value
> 49), the Gauge will make both arcs are equally sized.
In the following example, the Gauge will loop through the values 42, 50, and 58 every 1.5 seconds to make it easier to visualize.
Playground
Play with the configuration of the Gauge.
Gauge config
Customize your Gauge.