vue-directive-count-to

1.0.1 • Public • Published

Vue-Directive-Count-To

Vue-Directive-Count-To is a lightweight directive for VUE, you can use it in any HTML tags.

Installation

$ npm install vue-directive-count-to

Usage

Import this library and registe it in your main.js

import countTo from 'vue-directive-count-to'

Vue.directive('countTo', countTo)

In your VUE component, you can use this directive as follow:

<div v-countTo="countNum"></div>

countNum is a static number either a variable number requested from backend. The default animation time is 3000 milliseconds.

If you want to change the animation time, you can set this directive like this:

<div v-countTo:time.5000="countNum"></div>

Dependencies (0)

    Dev Dependencies (2)

    Package Sidebar

    Install

    npm i vue-directive-count-to

    Weekly Downloads

    8

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    4.97 kB

    Total Files

    5

    Last publish

    Collaborators

    • zq010