Índice do artigofaltam 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.
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.
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.
-
The modular rewrite
ESM-first API, independent modules and mandatory migration for those coming from version 3.
-
Text splitter in the core
text.split() joins the library, with support for languages without spaces, emojis and assistive reading.
-
Animation between layout states
createLayout() can now animate the transition between two positions calculated by the browser.
-
Fixed transform order
A breaking change: transforms now render in a fixed order, regardless of how they were declared.
-
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.
| Criterion | Anime.js | GSAP | Motion |
|---|---|---|---|
| License | MIT | Proprietary, free to use | MIT in the core |
| Per-module import | Yes, since 4.2.0 | Per registered plugin | Yes, with a mini package |
| Text splitter | In the core, free | Plugin, free since 2025 | Inside the paid product |
| Framework dependency | None | None | React, Vue or plain JavaScript |
| npm downloads per week | 1.14M | 4.74M | 19.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.
The stable version on npm is 4.5.0, published on June 22, 2026. There are three 5.0.0-beta versions published on npm, from August to November 2026, still without a tagged release on GitHub (checked on November 11, 2026).
v4 is a complete rewrite, with a modular, ESM-first API. Instead of a single anime() function, the library now exposes independent modules such as animate, createTimeline, createDraggable and onScroll.
Yes, the library is framework-agnostic and manipulates DOM elements. In React, the standard pattern is to create animations inside an effect and use the Scope module to clean everything up on unmount.
It depends on what matters most in the project. Anime.js offers per-module imports and a lean package; GSAP has a larger plugin ecosystem and more accumulated reference material.
No. The text splitter became part of the library itself in version 4.1.0, in July 2025, at no extra cost.





