1.0.1 • Published 4 years ago

vue-directive-count-to v1.0.1

Weekly downloads
8
License
MIT
Repository
github
Last release
4 years ago

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>