Countdown

Counts down to zero — a number of units or the time left to a date — and fires completed once at zero.

Features9APIThemingAccessibility

Basic

Counts value seconds down to zero with a suffix and fires completed once.

Redirecting in 5 s

Units

unit is seconds, minutes, hours or days; the number shows whole units left. format="clock" shows mm:ss / h:mm:ss instead.

  • Session expires in 15 min
  • Next sync in 6 h
  • Trial ends in 12 days
  • Same 15 minutes as a clock: 15:00

Target

target counts down to a date (a Date, ISO string or milliseconds) and shows a clock by default — here the time left until midnight.

Offer ends in 27:21

Ending soon

endingSoon (ms) turns the countdown to the "ending" colour near zero; tick gives the time left for a progress bar. The usual "auto-apply in N seconds" pattern with Cancel and Apply now.

Auto-apply
The payment is marked as paid when the time is up.
20 s

Pause

paused stops the countdown and keeps the time left; it goes on from there.

03:00

Template

A txCountdownValue template draws the time itself; it gets the milliseconds left and days, hours, minutes, seconds, expired.

3days05hours42minutes00seconds

Remaining time

The txRemainingTime pipe formats milliseconds as mm:ss or h:mm:ss — for lists driven by one clock signal.

  • Backup00:42
  • Report25:00
  • Rotation2:05:00

Design tokens

dt changes the weight and the "ending" colour of one countdown.

00:45

Pass through

pt.root styles the countdown — here a pill.

01:30