vue-number-transition

Zero dependency, simple animated-like number iteration directive for vue components
1,055 12
Install
npm install vue-number-transition
Latest Version:1.0.2
License:MIT
Last Updated:May 21, 2018
Links: GitHub  ·  npm
Maintainer: tugayilik

vue-number-transition-directive

Zero dependency, simple animated-like number iteration directive for vue components

Install

via npm

npm install vue-number-transition

via unpkg

https://unpkg.com/vue-number-transition@1.0.0/src/index.js

Usage

First import the directive and bind it to component's directives.

import NumberTransition from 'vue-number-transition';

export default {
    directives: {
        // ..
        NumberTransition
        // ..
    }
}

Then bind the directive on your target element;

<div id="count" v-number-transition="{ target: 500, iteration: 10, speed: 1000 }">

Parameters

target: The number that directive will count to. Can be computed property too.

iteration: The number of iterations until counter reaches to target number.

Example If you want to reach from 0 to 500 and iteration is 10, it will be increasing 50 by 50 (target/iteration) until 500.

speed: speed and iteration works together. The result of speed / iteration defines the interval speed between changes.

Related Packages

@morev/vue-transitions

Shareable Vue transitions library

412,603 222
vue-starport

Shared Vue component across routes with animations

57,522 1,949
vue-transition-components

Transition component collection of Vue.js

1,507 9
animation-list

Animation rendering based on Vue3 list elements (supports animation callbacks)

1,135 1

Version History

Version Released License
1.0.2 MIT
1.0.1 MIT
1.0.0 MIT