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

velocity-animate

Package Overview
Dependencies
Maintainers
3
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

velocity-animate

Accelerated JavaScript animation.

  • 1.5.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
196K
increased by3.04%
Maintainers
3
Weekly downloads
 
Created

What is velocity-animate?

Velocity-animate is a powerful and versatile JavaScript library for creating high-performance animations. It allows developers to animate HTML elements with a wide range of effects, including transformations, colors, and more. The library is known for its speed and efficiency, making it suitable for complex animations and large-scale projects.

What are velocity-animate's main functionalities?

Basic Animations

This feature allows you to create basic animations such as fading an element's opacity. The code sample demonstrates how to animate an element's opacity to 0.5 over a duration of 1000 milliseconds.

document.getElementById('element').velocity({ opacity: 0.5 }, { duration: 1000 });

Transformations

This feature enables you to apply transformations to elements, such as translating and rotating. The code sample shows how to move an element 100 pixels to the right and rotate it by 45 degrees over a duration of 1000 milliseconds.

document.getElementById('element').velocity({ translateX: '100px', rotateZ: '45deg' }, { duration: 1000 });

Color Animations

This feature allows you to animate color properties of elements. The code sample demonstrates how to change the background color of an element to red over a duration of 1000 milliseconds.

document.getElementById('element').velocity({ backgroundColor: '#ff0000' }, { duration: 1000 });

Easing Functions

This feature provides various easing functions to control the acceleration of animations. The code sample shows how to animate an element's opacity to 1 using the 'easeInOutQuad' easing function over a duration of 1000 milliseconds.

document.getElementById('element').velocity({ opacity: 1 }, { duration: 1000, easing: 'easeInOutQuad' });

Sequence Animations

This feature allows you to create sequence animations by chaining multiple animations together. The code sample demonstrates how to first animate an element's opacity to 0.5 and then back to 1, each over a duration of 1000 milliseconds.

Velocity(document.getElementById('element'), { opacity: 0.5 }, { duration: 1000 }).then(function() { return Velocity(document.getElementById('element'), { opacity: 1 }, { duration: 1000 }); });

Other packages similar to velocity-animate

Keywords

FAQs

Package last updated on 31 Jul 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