@vuecs/countdown
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@vuecs/countdown ⏰

npm version CI

This package provides a customizable countdown timer for Vue3 web applications. It offers a range of options for customization, including start and end times, step length, and more. Ideal for time-based events such as auctions, sales, or promotions.

Table of Contents

Installation

$ npm i --save @vuecs/countdown

Usage

Register the plugin.

import install from '@vuecs/countdown';
import { createApp } from 'vue'

const app = createApp({})

app.use(install, {
  /* optional options */
})

After the component is registered, it can be used as follows.

<template>
    <VCCountdown
        :auto-start="true"
        :emit-events="true"
        :interval="1000"
        :time="3600 * 1000"
    >
        <template #default="props">
            The countdown is still running for
            <span>
                {{ props.hours }} hour(s),
                {{ props.minutes }} minute(s),
                {{ props.seconds }} second(s)
            </span>.
        </template>
    </VCCountdown>
</template>

License

Made with 💚

Published under MIT License.

Package Sidebar

Install

npm i @vuecs/countdown

Weekly Downloads

246

Version

1.0.0

License

none

Unpacked Size

74.4 kB

Total Files

15

Last publish

Collaborators

  • tada5hi