Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-countup-v2

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-countup-v2

Vue.js(v2.x+) component wrap for CountUp.js(v1.x+)

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.3K
decreased by-32.9%
Maintainers
1
Weekly downloads
 
Created
Source

vue-countup-v2

Vue.js(v2.x+) component wrap for CountUp.js(v1.x+)

Installation

$ npm install --save countup.js vue-countup-v2

Usage

<template>
  <div class="iCountUp">
    <ICountUp
      :startVal="startVal"
      :endVal="endVal"
      :decimals="decimals"
      :duration="duration"
      :options="options"
      @ready="onReady"
    />
  </div>
</template>

<script type="text/babel">
  import ICountUp from 'vue-countup-v2';
  export default {
    name: 'demo',
    components: {
      ICountUp
    },
    data() {
      return {
        startVal: 0,
        endVal: 120500,
        decimals: 0,
        duration: 2.5,
        options: {
          useEasing: true,
          useGrouping: true,
          separator: ',',
          decimal: '.',
          prefix: '',
          suffix: ''
        }
      };
    },
    methods: {
      onReady: function(instance, CountUp) {
        const that = this;
        instance.update(that.endVal + 100);
      }
    }
  };
</script>

<style scoped>
  .iCountUp {
    font-size: 12em;
    margin: 0;
    color: #4d63bc;
  }
</style>

Properties

  • startVal [Number]

    Optional; 0 by defualt. The value you want to begin at.

  • endVal [Number]

    Required; The value you want to arrive at.

  • decimals [Number]

    Optional; 0 by defualt. Number of decimal places in number.

  • duration [Number]

    Optional; 2 by defualt. Duration in seconds.

  • options [Object]

    Optional; Formatting/easing options object.

See more countUp.js

Static Methods

  • start
  • pauseResume
  • reset
  • update

Learn more countUp.js

License

MIT

Keywords

FAQs

Package last updated on 02 Feb 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc