Founding price: $35, then $99 after 23:59 UTC on 4 November, then $99
Get ProA KPI that shows how old its value is, refreshes on demand with aria-busy, and warns once the age passes a threshold.
Derived from this item’s props table, because it declares no controls of its own. This item has no standalone playground, so changes update the code, the share link and the AI prompt.
A number that is fetched and can silently go out of date.
Do not use it when: Data that streams in continuously.
This item is part of tealmac UI Pro
The source for this item installs with a Pro licence key. Log in with your key to see the install command, or read the Pro setup page.
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | - | Metric name. |
value | number | - | Initial value. |
updatedAt | number | - | Epoch ms of last update. |
now | () => number | Date.now | Injectable clock. |
staleAfterMs | number | 300000 | Age after which the warning shows. |
onRefresh | () => Promise<number> | - | Returns the fresh value. |
The value block sets aria-busy while refreshing and is a polite live region. A failed refresh is announced with role=alert and keeps the old value.
The pattern ships with a test (kpi-stale-refresh.test.tsx). Tests drive the real interactions and the pure helper functions.