Skip to content
Ask for a Budget
TechnologyAugust 28, 20268 min readUpdated on November 11, 2026

Anime.js: what it is, what changed in version 4 and when to use it

What Anime.js is, why version 4 was a full rewrite, what each module costs in KB and how to choose between Anime.js, GSAP and Motion for your project.

Anime.js: what it is, what changed in version 4 and when to use it
Índice do artigo
faltam 7 min de leitura

Anime.js 4 is not an update to version 3: it is a different library with the same name. The question is no longer whether it animates well, but how much of the engine you want to load.

People looking for a JavaScript animation library tend to pick the most cited name and do not always look at what changed under it. In the case of Anime.js, everything changed: version 4 rewrote the library from scratch and swapped the single function for pieces you import separately.

This article explains what the library is today, reconstructs what version 4 actually changed, shows the cost in KB of each piece and ends with a practical criterion for choosing between Anime.js, GSAP and Motion.

Article summary

  • Anime.js is under the MIT license, allows commercial use without payment and is funded by sponsorship, according to its own website.
  • Version 4.0.0, from April 2025, was a complete rewrite: a modular, ESM-first API, with independent modules instead of a single function.
  • The full package declares 24.50 KB, but nobody needs to load all of it: since 4.2.0 each module has its own import path.
  • The text splitter, which in other libraries is a paid feature or a separate plugin, joined the core in July 2025.

Anime.js is a modular animation engine under the MIT license

Anime.js is a JavaScript library for animating DOM elements, SVG, plain objects and, since version 4.5.0, three.js scenes. It is under the MIT license, which means commercial use is allowed, with no subscription and no restriction clause. The license file in the repository contains only the standard MIT text, signed by Julian Garnier, the project's author and maintainer since 2016.

The project's scale surprises those who only know the most cited competitors. It has 72,492 stars on GitHub, more than double Motion's 33,395 and GSAP's 28,073, and about 1.14 million weekly downloads on npm.

72,492GitHub stars
1.14Mnpm downloads per week
4.5.0Current stable version
24.50 KBDeclared full package

Sources: GitHub API and npm registry, downloads for the week of August 18 to 24, 2026; declared size on animejs.com.

The contrast between stars and downloads says something useful about the project: many people admire it, fewer put it into production. This is not a flaw in the library; it is a market symptom. Anime.js was born as a tool for creative and portfolio animation, while the competitors with more downloads arrived inside UI frameworks, loaded as a transitive dependency of something else.

Version 4 was a rewrite, not an update

4.0.0 came out on April 3, 2025, and the release announcement itself describes it as a complete rewrite, with a modular, ESM-first API. In practice, this means code written for version 3 does not run on 4 without migration, and the way of thinking about animation changed.

In version 3, everything went through an anime() function that received a configuration object. In version 4, the library exposes named pieces: animate() to animate, createTimeline() to sequence, createTimer() to schedule, createDraggable() to drag, onScroll() to react to scrolling and createScope() to delimit the lifecycle. Each piece is a separate import.

Anyone coming from React will recognize the pattern. createScope() exists precisely for the problem that breaks animation in components: cleanup. You declare the scope, register the animations inside it, and everything is disposed of in a single call, without tracking loose timelines on unmount.

Package size is your choice, not a fixed number

The 24.50 KB the website announces is the total, and almost nobody needs the total. Since version 4.2.0, from September 2025, each module has its own import path, which lets you build the exact package for your project: import { animate } from 'animejs/animation' brings in the animation engine without dragging the element-dragging system along with it.

This changes the technical budget conversation. Instead of asking how much the library weighs, the right question becomes which features the interface actually uses.

Draggable6.41 KB
Timer5.60 KB
Animation5.20 KB
Scroll Observer4.30 KB
WAAPI3.50 KB
Timeline0.55 KB
Scope0.22 KB
Declared sizes per module on animejs.com. The animation module, highlighted, is the floor for anyone who just wants to animate properties.

The practical reading of the chart is that the timeline, the main selling point of any serious animation library, is the cheapest module on the list. It costs little because it inherits from the timer, which is already loaded. The heavy cost falls on projects that want to drag elements or react to scrolling, and those are precisely the features many projects do not use.

The text splitter joined the core for free

text.split() arrived in version 4.1.0, on July 23, 2025, and the announcement describes it as a full text splitter in just 7 KB. It breaks a block of text into characters, words and lines so that each piece can be animated on its own, that headline effect that assembles letter by letter.

Splitting text has historically been the feature libraries charge for, and this is where Anime.js stands out without relying on any performance comparison. In GSAP, SplitText only stopped requiring a subscription in 2025; in Motion, splitText is still inside the paid product. In Anime.js, it has been part of the library since 2025, under the same MIT license as the rest.

The detail that separates a serious implementation from a hack shows up in the release's feature list: splitting for languages that do not use spaces, such as Chinese and Japanese, handling of emojis and special characters, and accessible behavior for screen readers. Breaking text into <span> per character is easy; breaking it without destroying assistive reading is not.

Version 5 is in beta and points toward layout and 3D

As of November 11, 2026, there are three 5.0.0-beta versions published on npm: the first on August 5, the second on August 17 and the third on November 2, 2026. None of the three has a corresponding release on GitHub, which signals field testing rather than a launch, and the stable version is still 4.5.0. No new project should start with them.

What these betas reveal is the project's direction. The package's list of exported paths, kept up to beta.3, includes animejs/layout and animejs/adapters/three, two territories that v4 had already been gradually occupying.

  1. Apr 2025 v4.0.0
    The modular rewrite

    ESM-first API, independent modules and mandatory migration for those coming from version 3.

  2. Jul 2025 v4.1.0
    Text splitter in the core

    text.split() joins the library, with support for languages without spaces, emojis and assistive reading.

  3. Jan 2026 v4.3.0
    Animation between layout states

    createLayout() can now animate the transition between two positions calculated by the browser.

  4. Apr 2026 v4.4.0
    Fixed transform order

    A breaking change: transforms now render in a fixed order, regardless of how they were declared.

  5. Jun 2026 v4.5.0
    Adapters and three.js

    registerAdapter() opens animation to targets outside the DOM, with a ready-made adapter for three.js objects, materials, lights and cameras.

The April 2026 break deserves attention from anyone maintaining a project: from 4.4.0 onward, scale and translateX declared in the same animation always render in the same order, even if you wrote them the other way around. It is the kind of change that does not produce a console error and silently alters the visual result.

Anime.js, GSAP or Motion: the criterion is the shape of the project

All three libraries animate well, and choosing the fastest one is a question with no reliable public answer. The criterion left is the shape of the project: who writes the code, inside which framework, with what appetite for dependencies.

CriterionAnime.jsGSAPMotion
LicenseProprietary, free to useMIT in the core
Per-module importPer registered pluginYes, with a mini package
Text splitterPlugin, free since 2025Inside the paid product
Framework dependencyNoneReact, Vue or plain JavaScript
npm downloads per week4.74M19.31M for the current package

Sources: npm registry, week of August 18 to 24, 2026; licenses read in the official repositories; documentation pages of each project.

The row that weighs most against Anime.js is the last one. In adoption measured by downloads, the gap to the other two is an order of magnitude, and high adoption translates into ready answers when something breaks at eleven at night.

When Anime.js is not the right choice

There are three situations in which recommending Anime.js would be a stretch.

The first is a React team that already uses animated components from a library. If the team works with automatic layout animation and exit transitions tied to the component lifecycle, a library designed for React delivers that in less code, and mixing two animation engines on the same screen usually ends in property conflicts.

The second is simple micro-interactions. Hover, focus and fade are solved in plain CSS, with no dependency at all, and any library here is weight without return.

The third is a project that depends on a specific plugin already chosen. GSAP's plugin ecosystem is larger and has more publicly solved cases, and when the requirement comes from an effect seen on another site, the chance of a ready reference existing is higher there.

How to decide on a real project

The decision becomes objective when you answer four questions before installing anything.

  • Is the animation orchestrated in sequence, or are they isolated effects? An isolated effect is almost always CSS.
  • Does the project live inside a UI framework, or is it HTML served directly? A framework pushes toward a library from the same ecosystem.
  • Is the bundle budget tight enough that 5 KB matters? If so, per-module import stops being a detail.
  • Will someone maintain this code two years from now? If the answer is someone else, adoption and documentation weigh more than API elegance.

If the answers point to orchestrated sequences, no dominant framework and a tight bundle, Anime.js is the most direct choice of the three. If they point to React with animation tied to components, it is not.

Sources and method

The research for this article was done on August 28, 2026, always from primary sources. Versions, publication dates and licenses come from the npm registry and from the LICENSE and release files in the juliangarnier/anime repository. Stars, forks and version history come from the GitHub API. Per-module sizes and the statement that it is free come from animejs.com. Download numbers refer to the week of August 18 to 24, 2026. On November 11, 2026, the version status was checked again on the npm registry and GitHub releases: the stable version remains 4.5.0 and the third v5 beta came out on November 2.

No performance tests were run by X-Apps for this article, and for that reason no speed comparison between the libraries is made here. Anime.js, GSAP and Motion are external projects, with no commercial relationship with X-Apps.

Frequently asked questions

Yes. The repository is under the MIT license, which allows commercial use, modification and redistribution without payment. The website states that the project is funded by sponsorship.

Previous post
What is Astro and when to adopt the framework for your company website
Next post
Motion (formerly Framer Motion): what changed, what is free and what costs money
Newsletter

One email a month, no noise

What we learn shipping custom software and applied AI.

Related articles

GSAP: what it is, why it became free and when to use it in your project8 min · Technology
What is a web app and what are its benefits?9 min · Technology
Definitive Low-code Guide: What It Is and When to Use It9 min · Technology
How does a software house work?8 min · Technology
Web System: What It Is, How It Works, and the Benefits7 min · Technology

Accelerate your business with X-Apps

Ask for a Budget
X-Apps is an IT provider partner and advised by
Gartner
Receive our e-mails
News on software and applied AI.
Follow X-Apps