Countdown timer
This components shows the remaining time (in days, hours, minutes or seconds) to a given date.

Ionic Countdown timer Component

A few examples on how to use this component

From days to seconds

1
<app-countdown-timer class="item-countdown" [end]="details?.expirationDate" [units]="{from: 'day', to: 'second'}"></app-countdown-timer>
Copied!

From days to minutes

1
<app-countdown-timer class="item-countdown" [end]="details?.expirationDate" [units]="{from: 'day', to: 'minute'}"></app-countdown-timer>
Copied!

From hours to seconds

1
<app-countdown-timer class="item-countdown" [end]="details?.expirationDate" [units]="{from: 'hour', to: 'second'}"></app-countdown-timer>
Copied!

From hours to minutes

1
<app-countdown-timer class="item-countdown" [end]="details?.expirationDate" [units]="{from: 'hour', to: 'minute'}"></app-countdown-timer>
Copied!

From minutes to seconds

1
<app-countdown-timer class="item-countdown" [end]="details?.expirationDate" [units]="{from: 'minute', to: 'second'}"></app-countdown-timer>
Copied!

Just days

1
<app-countdown-timer class="item-countdown" [end]="details?.expirationDate" [units]="{from: 'day', to: 'day'}"></app-countdown-timer>
Copied!

Just hours

1
<app-countdown-timer class="item-countdown" [end]="details?.expirationDate" [units]="{from: 'hour', to: 'hour'}"></app-countdown-timer>
Copied!

Just minutes

1
<app-countdown-timer class="item-countdown" [end]="details?.expirationDate" [units]="{from: 'minute', to: 'minute'}"></app-countdown-timer>
Copied!

Just seconds

1
<app-countdown-timer class="item-countdown" [end]="details?.expirationDate" [units]="{from: 'second', to: 'second'}"></app-countdown-timer>
Copied!
See the live Showcase to learn how to use and customize this component.
Last modified 2mo ago