Countdown
Use Countdown to add a ticking timer to your pages. These are typically used on "coming soon" pages to indicate the launch date of a website.
Setting the date
Simply add the attribute data-countdown-date
to any element (usually a span
) and the countdown timer will be displayed as the content of the element.
The accepted date formats are:
- YYYY/MM/DD
- MM/DD/YYYY
- YYYY/MM/DD hh:mm:ss
- MM/DD/YYYY hh:mm:ss
<span data-countdown-date="2025-10-21"></span>
Change the Word "days"
To override the word days for translation purposes, use the data-days-text
attribute. Eg. for Spanish language use data-days-text="dias"
.
<span data-countdown-date="2025-10-21" data-days-text="dias"></span>
The above example would render 72 dias 10:34:50.
Override the Format
To provide a different format for the countdown text use the data-date-format
attribute. This will replace the default format, and will override the data-days-text
option.
<span data-countdown-date="2025-10-21" data-date-format="`%D Days, %H Hours`"></span>
The above example would render 10 Days, 16 Hours. For a full list of formatting options, please consult the countdown docs.
Fallback String
To provide a fallback string for when the timer has elapsed (ie. when the target date has been reached) use the data-date-fallback
attribute.
<span data-countdown-date="2025-10-21" data-date-fallback="The timer has elapsed..."></span>