animejs, gsap, and velocity-animate are JavaScript engines designed to handle high-performance web animations. gsap is the industry standard for complex sequences, offering robust timeline control and extensive plugin support. animejs provides a lightweight, promise-based API suitable for modern UI effects and SVG manipulation. velocity-animate was a popular tool during the jQuery era but is now considered legacy due to lack of active maintenance and modern feature support.
Both animejs, gsap, and velocity-animate aim to simplify DOM manipulation through animation, but they differ significantly in architecture, maintenance status, and capability. Let's compare how they handle common engineering challenges.
gsap uses a clear, chainable syntax focused on targets and properties.
// gsap: Standard tween
import { gsap } from "gsap";
gsap.to(".box", {
duration: 1,
x: 100,
opacity: 0,
ease: "power2.out"
});
animejs uses a single object configuration for all settings.
// animejs: Standard tween
import anime from "animejs";
anime({
targets: ".box",
translateX: 100,
opacity: 0,
duration: 1000,
easing: "easeOutQuad"
});
velocity-animate uses a function call attached to elements or standalone.
// velocity-animate: Standard tween
import Velocity from "velocity-animate";
Velocity(document.querySelector(".box"), {
translateX: 100,
opacity: 0
}, {
duration: 1000,
easing: "easeOutQuad"
});
gsap offers the most powerful timeline system.
// gsap: Timeline control
import { gsap } from "gsap";
const tl = gsap.timeline();
tl.to(".box", { x: 100 })
.to(".box", { y: 100 }, "+=0.5");
tl.pause(); // Control playback manually
animejs provides a basic timeline object.
// animejs: Timeline control
import anime from "animejs";
const tl = anime.timeline();
tl.add({
targets: ".box",
translateX: 100
}).add({
targets: ".box",
translateY: 100
}, "+=500");
tl.pause(); // Basic playback control
velocity-animate relies on sequence arrays or jQuery chaining.
// velocity-animate: Sequence via promises
import Velocity from "velocity-animate";
Velocity(document.querySelector(".box"), { translateX: 100 })
.then(() => {
return Velocity(document.querySelector(".box"), { translateY: 100 });
});
// No native timeline instance to pause or reverse easily
gsap requires a plugin for advanced SVG paths.
MotionPathPlugin handles complex curves accurately.// gsap: SVG Path
import { gsap } from "gsap";
import { MotionPathPlugin } from "gsap/MotionPathPlugin";
gsap.registerPlugin(MotionPathPlugin);
gsap.to(".circle", {
motionPath: {
path: "#myPath",
align: "#myPath"
}
});
animejs has built-in support for SVG path morphing.
// animejs: SVG Path
import anime from "animejs";
anime({
targets: ".circle",
path: anime.motionPath("#myPath"),
easing: "linear"
});
velocity-animate has limited SVG support.
// velocity-animate: SVG (Limited)
import Velocity from "velocity-animate";
// No native path following
// Must animate individual coordinates manually
Velocity(document.querySelector(".circle"), {
cx: 100,
cy: 100
});
gsap is actively maintained with regular updates.
// gsap: Current ecosystem
// Regularly updated plugins and community support
import { ScrollTrigger } from "gsap/ScrollTrigger";
animejs is maintained but updates are less frequent.
// animejs: Current ecosystem
// Stable MIT license, community driven
import anime from "animejs";
velocity-animate is effectively legacy software.
// velocity-animate: Legacy status
// No recent updates or modern feature support
import Velocity from "velocity-animate";
| Feature | gsap | animejs | velocity-animate |
|---|---|---|---|
| Syntax | 🔹 Chainable, target-based | 🔹 Single object config | 🔹 jQuery-style function |
| Timelines | 🎬 Advanced, nested, labeled | 🎬 Basic, linear | ❌ Manual promise chaining |
| SVG Support | 🎨 Plugin required (some paid) | 🎨 Built-in path morphing | ⚠️ Limited, manual coords |
| License | 📄 Free (standard), Paid (tools) | 📄 MIT (Fully Open) | 📄 MIT (Legacy) |
| Maintenance | ✅ Active | ✅ Active | ❌ Inactive |
gsap is the professional choice 🏆 — best for complex interactions, scroll effects, and teams needing reliable support. It handles heavy lifting without breaking a sweat.
animejs is the lightweight contender 🪶 — perfect for UI micro-interactions, SVG effects, and projects where bundle size and open source freedom matter most.
velocity-animate is the legacy option 🕸️ — avoid for new work. It served a purpose in the jQuery era but lacks the tools needed for modern web development.
Final Thought: For most professional frontend architectures, gsap provides the safest bet for scalability. If you need something smaller and fully open source, animejs is a solid backup. Leave velocity-animate in the past.
Choose animejs if you prefer a lightweight library with a simple promise-based API for UI effects or SVG path morphing. It is ideal for projects that need modern syntax without the licensing complexity or bundle weight of larger engines.
Choose gsap if you need robust timeline control, scroll-triggered animations, or production-grade reliability for complex interfaces. It is the best fit for large-scale applications where performance and long-term support are critical priorities.
Do not choose velocity-animate for new projects. It lacks active maintenance and modern features required for current web standards. Only consider it if you are maintaining a legacy codebase that already depends on it heavily.
Anime.js is a fast, multipurpose and lightweight JavaScript animation library with a simple, yet powerful API.
It works with CSS properties, SVG, DOM attributes and JavaScript Objects.
Anime.js is 100% free and is only made possible with the help of our sponsors. Help the project become sustainable by sponsoring us on GitHub Sponsors.
|
|
|
|
|
|
|
|
|
Get featured here by becoming a GitHub Sponsor.
Anime.js V4 works by importing ES modules like so:
|
|
The full documentation is available here.
You can find the v3 to v4 migration guide here.
First, run npm i to install all the necessary packages.
Then, execute the following scripts with npm run <script>.
| script | action |
|---|---|
dev | Watches for changes in src/**/*.js, bundles the ESM version to lib/ and creates type declarations in types/ |
dev:test | Runs dev and test:browser concurrently |
build | Bundles ESM / UMD / CJS / IIFE versions to lib/ and creates type declarations in types/ |
test:browser | Starts a local server and runs all browser-related tests |
test:node | Starts Node-related tests |
open:examples | Starts a local server to browse the examples locally |