Officina UI
Components

CountdownTimer

Live countdown to a target date, ticking once a second in days, hours, minutes, and seconds.

CountdownTimer counts down to a target Date, updating every second and showing the remaining days, hours, minutes, and seconds. It is SSR-safe — it renders a placeholder until mount to avoid hydration mismatches — and shows doneLabel once time runs out. Use it for sales, launches, or session expirations.

Example

Preview
——
import { CountdownTimer } from '@officina/ui';

function LaunchCountdown() {
  return <CountdownTimer target={new Date('2026-12-31T23:59:59')} doneLabel="We're live!" />;
}

API

PropTypeDefaultDescription
target*Date—
doneLabelstringDone

On this page