Skip to content
Stylhero 0.8.0
Components

Core

Layout and type

Inputs

Overlays

Navigation

Data display

Charts

Transitions and utilities

Page pieces (landing pages, portfolios, docs)

Icons

Components / Charts

Gauge

One number against a goal, as a half ring (MUI X's Gauge).

import { Gauge } from "@stylhero/ui";

Example

Code
import { Gauge } from "@stylhero/ui";

function GaugeExample() {
  return <Gauge value={68} label="Build score" valueText="68 / 100" />;
}

Props

PropTypeDefaultDescription
value required number -
label ReactNode - Text under the number, e.g. "of monthly goal".
max number 100
size number 180
valueText ReactNode - Text in the middle; defaults to the percentage.

Also takes every <div> attribute (id, style, data-*, aria-*, event handlers…), passed to that element.

Accessibility

  • role="meter" with aria-valuenow, -min and -max.

Generated from src/components/Charts.tsx. Something wrong or missing? Open an issue.