Active users+12.4%
12,840Compared with last week
A compact summary for a number that needs context.
import { MetricCard } from "@sagui/ui";Install the package and import the styles once. The installation guide covers the Tailwind setup.
$ npm install @sagui/uiimport { MetricCard } from "@sagui/ui";
export function Uptime() {
return <MetricCard label="Uptime" value={99.9} suffix="%" context="Last 30 days" change="+0.2%" />;
}A leading minus reads red, and the digits roll down.
The number turns the way it moved, and the label, chip and context reword in place.
A compact card with a label, an odometer style number, context line, and optional change chip.
| Prop | Type | Default | Description |
|---|---|---|---|
label (required) |
string |
– | What is measured. |
value (required) |
number |
– | The number. Rolls up from zero on first view, then between values. |
suffix |
string |
– | Text after the number, such as "%" or " ms". |
prefix |
string |
– | Text before the number, such as "$". |
decimals |
number |
0 |
Fixed fraction digits. |
context (required) |
string |
– | Line under the number, such as "vs last week". |
change |
string |
– | Chip in the top corner, such as "+12%". A leading plus reads green and a leading minus red. Omit to hide it. |
className |
string |
– | Added to the root article. |
Compared with last week
Lower is better
Last 30 days
This week