@zedtech/zedkit-ui
Stamp data with its age
@zedtech/zedkit-ui — alpha
alpha
At a glance
- Who: Developers stamping cached or polled data with its freshness.
- What: A relative "Updated N minutes ago" stamp via
Intl.RelativeTimeFormat, no date library. - Use when: Under data that refreshes (polling, SWR, manual refetch).
- Avoid when: For absolute timestamps — render a
<time dateTime>instead. - See also: Name an operation in progress
Install
pnpm add @zedtech/zedkit-uiLatest: 0.4.0 (via changesets).
Example
import { UpdatedAgo } from "@zedtech/zedkit-ui";
<UpdatedAgo date={updatedAt} /> // "Updated 3 minutes ago" via Intl.RelativeTimeFormatWraps: (none)