Skip to content
Design System
GitHub

Freshness stamp

v0.64.0, changelogBeta

How old a device's last report is, beside the values it qualifies: live, lagging, stale, never reported, or not applicable (air-gapped).

Devices 5

  • lm-hsinchu-01Hsinchu plant, line 2Reported this minute. Last report at Nov 27, 2026, 14:01
  • lm-taoyuan-03Taoyuan depotLast report 6 minutes ago. Last report at Nov 27, 2026, 13:56
  • lm-taichung-02Taichung labOut of date: last report 1 day ago. Last report at Nov 26, 2026, 12:02
  • lm-tainan-01Tainan office, registered todayNot reported yet
  • lm-kaohsiung-07Kaohsiung secure siteDoes not report (air-gapped)

Levels

Install
npx shadcn add @syncrobotic/freshness-stamp

Also installs: @syncrobotic/cn, @syncrobotic/use-now, @syncrobotic/relative-time, @syncrobotic/status-glyph, @syncrobotic/tooltip

Overview

When to use

  • Beside a device's reported values on its detail page: modules running, GPU, disk.
  • In a fleet list's last-seen column, with one now for every row.

Use something else

  • Live telemetry that streams (a camera, a chart): their own staleAfterMs.
  • Whether the device is online at all: its liveness as an InlineStatus beside its name.
  • A failed refresh of data the server holds: Data state stale.

More examples

States and real uses. Each example is also a Storybook story and a visual regression test.

Beside values

Icon and hidden

Clock ahead

Zh tw

Usage rules

  • Put it beside every value a device reported, not on the page once: a panel of numbers from a device that stopped yesterday looks exactly like one from a second ago.
  • The thresholds are the server's liveness (laggingAfterMs, staleAfterMs), and its offline verdict wins when it sends one. Never a number of the interface's own.
  • Colour only for lagging (warning) and stale (danger). Never reported and air-gapped are grey: one has not started, the other reports by design.
  • hideWhenLive where a mark on every healthy panel would teach people to stop reading marks; variant="icon" where the age is said once nearby.
  • Pass one now from useNow on the page, so a list of stamps changes together.

Changelog

  • 0.64.02026-12-01Formatted with Prettier (class order sorted); the code is unchanged.
  • 0.56.02026-11-27First release: freshnessOf(lastAt, thresholds, { now, airGapped, offline }) (air-gapped before never, the server's verdict before thresholds, a future report is live); the age in words, the exact time in a tooltip and for screen readers; colour only when lagging or stale.

How to upgrade