You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

vue3-odometer-counter

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue3-odometer-counter

Vue.js(v3.2+) component wrap for Odometer.js

0.0.9
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

vue3-odometer-counter

Vue.js(v3.2+) component wrap for Odometer.js

Forked from vangleer/vue3-odometer

Installation

npm install --save odometer-counter vue3-odometer-counter

Usage

<template>
  <Vue3Odometer class="o-text" :value="number" />
  <button @click="update">update number</button>
</template>

<script lang="ts" setup>
import { ref } from 'vue'
import Vue3Odometer from 'vue3-odometer-counter'
import 'odometer-counter/themes/odometer-theme-main.css'
const number = ref(100)

function update() {
  number.value = Math.floor(Math.random() * 1000)
}
</script>

<style>
.o-text {
  color: red;
}
</style>

Properties

  • value [Number]

    Optional; 0 by default.

  • format [String]

    Optional;

  • theme [String]

    Optional; default by default.

  • duration [Number]

    Optional;

  • animation [String]

    Optional;

  • formatFunction [Function]

    Optional;

See more Odometer.js

Methods

  • renderInside
  • watchForMutations
  • startWatchingMutations
  • stopWatchingMutations
  • cleanValue
  • bindTransitionEnd
  • resetFormat
  • renderDigit
  • formatDigits
  • insertDigit
  • addDigit
  • addSpacer
  • animate
  • animateCount
  • getDigitCount
  • getFractionalDigitCount
  • resetDigits
  • animateSlide
  • render
  • update

Learn more Odometer.js

License

MIT

Keywords

odometer

FAQs

Package last updated on 11 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts