StaleIndicator
Last-synced + retry.
npx shadcn add @lopifi/stale-indicatorExamples
The same component, case by case. Each stage is the shipped code with the props it shows; switch to Code for the usage.
With retry
When the reader can refresh the feed, the strip offers it next to the timestamp that raised the alarm.
Read-only
Without onRetry it still states the age of the data; a viewer who cannot resync still needs to know.
Over a cached balance
Placed on the figure it qualifies, so a cached bank balance can never be read as today's.
How it behaves
What it renders, what it refuses to render, and why. The same paragraphs as the family spec, so the two can’t disagree.
"Last synced 12m ago · Retry". Appears on any surface showing cached or offline data. Dims the affected values to 0.7 — wrap them in StaleValue, or pass stale to the Card that holds them.
The age stays relative past the hour ("3h ago", "2d ago") — unlike AsOf, because the age is the alarm — with the absolute stamp and its named zone on hover. The server and first paint render the date alone; the age swaps in once the client clock is available, off the shared one-interval clock.
Stale financial data shown as current is the most dangerous state in the product. This component makes it impossible to miss.
The accounting it encodes
The concepts this component renders, each defined once in the lexicon.
More in System & states
See also
Where this component is specified, defined and running.
Elsewhere in the system
The live section StaleIndicator renders in, the calculators behind its figures, and the ledger payloads that feed it.
- StaleIndicator, runningThe system showcase — live, with theme, density, grayscale and reduced-motion switches.
- Reading, paging and delta syncHow do you get everything out, and then keep it fresh?
- Webhooks and freshnessHow do you find out something changed?
- System & statesEmpty, error, loading, stale and confirm states. They decide whether a product feels finished. Specs for 9 React components: EmptyState, ErrorState, Skeleton, StaleIndicator and 5 more.
Components are copied into your repository and meant to be edited. Rounding policy, fiscal calendar and compliance copy differ per company.
Release notes
Get an email when System & states changes
Your copy doesn’t update itself when we fix something here.
- One email when a System & states component needs a migration
- Nothing when nothing changes
Or install it now