Engram

Countdown

atom

A live countdown to a timestamp (vendor/weekly/event resets).

Install

npx shadcn@latest add @engram/countdown

Registry item: /r/countdown.json — the machine-readable definition agents install from.

Example

Resets in1d 2h

Props

PropTypeDefaultDescription
until*Date | numberTarget time — a Date or epoch milliseconds.
format(msRemaining: number) => stringformatDurationFormat remaining ms → string. Default: compact "2d 4h" / "12m 30s".
expiredLabelstring"—"Shown once the target has passed. Default "—".
onElapsed() => voidFired once when the timer crosses zero.
classNamestring

Own the code: shadcn add copies this component's source into your repo to read and edit directly. Extend without forking — edit the source, use asChild to swap the element, or pass the typed annotations prop for curated data.