Stat
One figure with its label and a hint: a tile on its own.
import { Stat } from "@forgeron/ui";- Runs
- 1,204
- Last 7 days
import { Stat } from "@forgeron/ui";
export default function Default() {
return (
<div style={{ width: 220 }}>
<Stat label="Runs" value="1,204" hint="Last 7 days" />
</div>
);
}- Members
- 48
- 3 invited
- Tools
- 21
- 4 with updates
- Storage
- 12.4 GB
- of 50 GB
import { Stat } from "@forgeron/ui";
// Tiles on their own, each in its frame. For a row of figures that move, see the KPI row.
export default function SideBySide() {
return (
<div style={{ display: "grid", gridTemplateColumns: "repeat(3, minmax(0, 1fr))", gap: 16 }}>
<Stat label="Members" value="48" hint="3 invited" />
<Stat label="Tools" value="21" hint="4 with updates" />
<Stat label="Storage" value="12.4 GB" hint="of 50 GB" />
</div>
);
}API → Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | ReactNode | — | What the figure counts, in mono capitals. |
value | ReactNode | — | The figure, already written. |
hint | ReactNode | — | Context under it: last 7 days. |
className | string | — | Extra classes. |