🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

animated-number-vue

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

animated-number-vue

A vue component with number animation

0.0.7
Source
npm
Version published
Weekly downloads
3.9K
-1.41%
Maintainers
1
Weekly downloads
 
Created
Source

animated-number-vue

npm Build Status

A simple vue animated number for Vue2, using anime.

Live demo here

Usage

$ npm install animated-number-vue
# OR
$ yarn add animated-number-vue
<template>
    <animated-number 
    :value="value" 
    :formatValue="formatToPrice" 
    :duration="300"
    />
</template>
<script>
import AnimatedNumber from "animated-number-vue";

export default {
  components: {
    AnimatedNumber
  },
  data() {
    return {
      value: 1000
    };
  },
  methods: {
    formatToPrice(value) {
      return `R$ ${Number(value).toFixed(2)}`;
    }
  }
};
</script>

View demo here Edit animated-number-vue

Props

Follwing props are used while initialization

Note : Only value is a required prop. Others are optional

Prop NameTypeDescription
value (required)[ Number, String]number that will be animated
formatValue (optional)Functiona function that will manipulate the animated value
duration (optional)Numberthe duration of animation

Keywords

animation

FAQs

Package last updated on 06 Apr 2018

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