Vue Awesome Countdown

2.0.0 · active · verified Sun Apr 19

vue-awesome-countdown is a robust and precise countdown plugin designed for both Vue 2.5.0+ and Vue 3 applications, offering high performance and comprehensive TypeScript support. The current stable version is 2.0.0. While a specific release cadence isn't published, its simultaneous support for both major Vue versions indicates active maintenance and commitment to modern Vue ecosystems. Key differentiators include its focus on high accuracy for timing-sensitive applications, the provision of detailed time objects (`timeObj`) for granular control over display, and flexible integration methods including global registration with custom naming or direct component import for local scoping. It also gracefully handles the differing slot syntaxes between Vue 2 and Vue 3, making it adaptable across various project setups.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates how to use `vue-awesome-countdown` as a locally imported component in a Vue 3 Composition API SFC with TypeScript, displaying remaining time and a 'Done!' message.

<template>
  <VueAwesomeCountdown :end-time="endTime">
    <template v-slot:process="{ timeObj }">
      <span>{{ `Lefttime: ${timeObj.m}:${timeObj.s}` }}</span>
    </template>
    <template v-slot:finish>
      <span>Done!</span>
    </template>
  </VueAwesomeCountdown>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { VueAwesomeCountdown } from 'vue-awesome-countdown'

const endTime = ref(Date.now() + 60000) // Set countdown for 1 minute
</script>

view raw JSON →