Skip to content

zk-countdown ​

The time left until a date, written by the server and kept up to date by the script.

Props ​

PropTypeDefaultDescription
targetstring|DateTimeInterfacerequiredThe date
showDaysboolfalseShow the days even when there are none
unitsarray['days' => 'd', 'hours' => 'h', 'minutes' => 'm', 'seconds' => 's']Text after each number
classstring|nullnullCSS class(es) merged onto the root element

Undeclared attributes forward to the root element.

A <time datetime="PT…S"> with one <span class="countdown-part" data-unit> per unit. Needs the script countdown of zk-scripts: the component asks for it by itself. Without it the text is the time left when the page was made. It does not announce each second to assistive technology.

Examples ​

Launch ​

blade
<x-zk-countdown target="2027-01-01 00:00:00" />

Documentation of 3.2.0 , built from c93e21f on 3.2.0 by pipeline #2919741884 on 2026-10-06.