Skip to content
Odometer VueJS component
JavaScript Vue HTML
Branch: master
Clone or download
JefferyHus Merge pull request #11 from JefferyHus/dependabot/npm_and_yarn/mixin-…

Bump mixin-deep from 1.3.1 to 1.3.2
Latest commit f8e5595 Aug 28, 2019


About Vue-Odometer

Smoothly transitions numbers with ease. Use this library to give you application a smooth animation, only applicable on numbers, for more details about the OdometerJS pelase refer to:


npm install v-odometer


If you are getting the error of "Unknown Odometer keyword", this means that you are missing odometer library in your application, simply because the Odometer library is not yet exported as an AMD module and still only a commenJS file (refer to: AMD exporting issues). However if you are not building your applciation in a webpack envirment or similar, and you include VueJS file from a public cdn, then you are fine to include the ./v-odometer/dist/, the Vue will be public in your window there for this component will be automatically integrated as a global component and you can simply use it directly insidde your html file:

	<vue-odometer :value="myValue"></vue-odometer>


ECMAScript 6 (ES6)/ ECMAScript 2015 (ES2015)

To cherry pick the component, start by importing it in the file where it is being used:

import VueOdometer from 'v-odometer/src'

Then add it to your component definition:

Vue.component('my-component', {
    components: {
        'vue-odometer': VueOdometer
    // ...

Or register it globally:

Vue.component('vue-odometer', VueOdometer);

ECMAScript 5 (ES5)

	<!-- Metas -->
	<meta name="title" content="v-odometer">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<meta name="description" content="">
	<meta name="keywords" content="">
	<title>Odometer - VueJS component</title>
	<!-- include this style file, it contains all the themes provided from odometer -->
	<link rel="stylesheet" href="./your/path/to/main.css">
	<!-- don't forget to include the odometer library -->
	<script src=""></script>
	<!-- then load this component -->
	<script type="text/javascript" src="./your/path/to/"></script>
	<div id="app">
		<vue-odometer :value="mynumber" class="myClassName"></vue-odometer>
var app = new Vue({
	data: {
		mynumber: ""


value: { type: Number, default: () => 0 },
theme: { type: String, default: () => 'minimal' },
format: { type: String, default: () => '(.ddd),dd' },
duration: { type: Number, default: () => 3000 },    
className: { type: String, default: () => 'odometer' },    
animation: { type: String, default: () => 'count' },    
formatFunction: { type: Function },
You can’t perform that action at this time.