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
| Prop | Type | Default | Description |
|---|---|---|---|
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"witharia-valuenow,-minand-max.
Generated from src/components/Charts.tsx. Something wrong or missing? Open an issue.