Socket
Socket
Sign inDemoInstall

@160over90/vue-tweened-number

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@160over90/vue-tweened-number

A component for tweening between numeric values.


Version published
Maintainers
1
Created
Source

TweenedNumber

A component for tweening between numeric values.

Features

Allows you to tween any given numbers. You also have the ability to change CSS or invoke logic while the value is tweening or once the tweening is completed.

Events

This component allows two event hooks.

  • @update allows you to execute logic while the value is tweening.
  • @complete allows you to execute logic once the tweening is completed.

Example

<TweenedNumber
  :value="number"
  :duration="2000"
  :easing="easing.bind()"
  @update="update"
  @complete="complete"
/>
...
methods: {
  update() {
    // Do something
  },
  complete() {
    // Do something
  },
},

To get access to the original DOM event, use the special $event variable.

<TweenedNumber
  :value="number"
  :duration="2000"
  :easing="easing.bind()"
  @update="update($event)"
/>
...
methods: {
  update(event) {
    // eslint-disable-next-line no-console
    console.log('updating', event);
  },
},

Props

tag (String, Default: 'span') The type of HTML element you want.

value (Number, Required) The value that you want to tween.

easing ([String, Function], Default: TWEEN.Easing.Linear.None) What determines how Tween.js interpolates between values. For more information on Tween easing methods click here.

duration (Number, Default: 1000) How long you want the tweening to last.

Project setup

yarn install

Compiles and hot-reloads for development

yarn run serve

Compiles and minifies for production

yarn run build

Lints and fixes files

yarn run lint

FAQs

Package last updated on 20 Sep 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