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

velocityjs

Package Overview
Dependencies
Maintainers
1
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

velocityjs

Velocity Template Language(VTL) for JavaScript

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
392K
decreased by-15.53%
Maintainers
1
Weekly downloads
 
Created

What is velocityjs?

Velocity.js is a fast, feature-rich animation engine for JavaScript. It allows you to animate HTML elements with a variety of effects, providing a more performant alternative to jQuery's $.animate() method. Velocity.js is designed to work seamlessly with jQuery but can also be used as a standalone library.

What are velocityjs's main functionalities?

Basic Animations

This feature allows you to animate basic CSS properties like opacity and position. The code sample animates an element's opacity to 0.5 and moves it to 50% from the left over a duration of 1000 milliseconds.

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

Color Animations

Velocity.js supports color animations, allowing you to animate CSS color properties. The code sample changes the background color of an element to red over a duration of 1000 milliseconds.

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

Scroll Animations

This feature allows you to animate scrolling to a specific element. The code sample scrolls the page to the element with an offset of -50 pixels over a duration of 1000 milliseconds.

document.getElementById('element').velocity('scroll', { duration: 1000, offset: -50 });

Easing

Velocity.js provides various easing functions to control the animation's acceleration and deceleration. The code sample animates an element's opacity to 1 using a 'spring' easing function over a duration of 1000 milliseconds.

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

Chaining Animations

You can chain multiple animations together in sequence. The code sample first animates an element's opacity to 0.5 and then moves it to 50% from the left, each over a duration of 1000 milliseconds.

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

Other packages similar to velocityjs

Keywords

FAQs

Package last updated on 12 Jun 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