Skip to content

UtilityCountdown ​

A countdown in a time element, not announced every second.

ts
import { UtilityCountdown } from '@zairakai/vue-components/Utility'

Usage ​

vue
<UtilityCountdown :target="…" />

Example ​

vue
<script setup>
  const target = Date.now() + 1000 * 60 * 60 * 26
</script>

<template>
  <UtilityCountdown
    :target="target"
    show-days
  />
</template>

Props ​

NameTypeDefaultDescription
idstring
classstring
targetdate|number|stringrequiredThe moment to count down to: a date, a timestamp or an ISO string.
intervalnumber1000How often it updates, in milliseconds.
showDaysbooleanfalseShow the days even when there are none.
unitsobject{ days: 'd', hours: 'h', minutes: 'm', seconds: 's' }

Events ​

NameDescription
finished
tick

Slots ​

NameDescription
default

See Theming for the class hooks and the data-* state of the components.

Documentation of 1.4.4 , built from 8e9b054 on 1.4.4 by pipeline #2989941079 on 2026-10-26.