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

animejs

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

animejs

JavaScript animation engine

  • 3.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is animejs?

Anime.js is a lightweight JavaScript animation library with a simple, yet powerful API. It works with CSS properties, SVG, DOM attributes, and JavaScript Objects.

What are animejs's main functionalities?

Basic Animation

This feature allows you to animate basic properties like translation, rotation, and background color of a DOM element.

anime({
  targets: 'div',
  translateX: 250,
  rotate: '1turn',
  backgroundColor: '#FFF',
  duration: 800
});

Timeline Control

Timelines allow you to create complex animation sequences with precise control over the timing of each animation.

var tl = anime.timeline({
  easing: 'easeOutExpo',
  duration: 750
});

tl.add({
  targets: '.box',
  translateX: 250
}).add({
  targets: '.box',
  translateY: 250,
  offset: '-=500' // Starts 500ms before the previous animation ends
});

SVG Animations

Anime.js can animate SVG properties, allowing for intricate and visually appealing vector animations.

anime({
  targets: 'path',
  strokeDashoffset: [anime.setDashoffset, 0],
  easing: 'easeInOutSine',
  duration: 1500,
  delay: function(el, i) { return i * 250 },
  direction: 'alternate',
  loop: true
});

Keyframes

Keyframes allow you to define multiple stages of an animation, giving you more control over the animation sequence.

anime({
  targets: '.box',
  keyframes: [
    {translateX: 250},
    {translateY: 250},
    {translateX: 0},
    {translateY: 0}
  ],
  duration: 4000,
  easing: 'easeOutElastic(1, .8)',
  loop: true
});

Other packages similar to animejs

Keywords

FAQs

Package last updated on 09 Jan 2019

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