AsOf
Timestamp with live relative formatting and a stated timezone.
npx shadcn add @lopifi/as-ofExamples
The same component, case by case. Each stage is the shipped code with the props it shows; switch to Code for the usage.
Compact meta row
On a dense meta row the stamp shows the date alone and keeps the clock time and zone in its tooltip.
Named source
The prefix says what happened at that instant — synced, fixed, posted — so the timestamp is never ambiguous.
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.
<AsOf date={lastSync} /> // "2m ago" · title="6 Sep 2026, 09:12 UTC"
Relative under an hour, absolute beyond. Timezone always stated in the absolute form. Updates from one shared interval, never one setInterval per instance, and pauses when the tab is hidden or the element is off-screen.
Every figure in the system carries one. A balance without an "as of" can't be trusted.
The accounting it encodes
The concepts this component renders, each defined once in the lexicon.
More in Primitives
See also
Where this component is specified, defined and running.
Elsewhere in the system
The live section AsOf renders in, the calculators behind its figures, and the ledger payloads that feed it.
- AsOf, runningThe primitives 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?
- PrimitivesBuild these first. Everything above them inherits their mistakes. Specs for 16 React components: Money, Delta, Figure, Percent and 12 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 Primitives changes
Your copy doesn’t update itself when we fix something here.
- One email when a Primitives component needs a migration
- Nothing when nothing changes
Or install it now