The layout is finished. Every card sits on the grid, the spacing is right, and the page looks correct in a screenshot. Then a visitor opens it and nothing moves, so the whole thing reads like a wireframe with real text. anime.js exists for that moment. It turns a static layout into motion with a few readable lines of JavaScript, and more than 75,000 people have starred it on GitHub.
What anime.js actually does
anime.js is an animation engine for the web, published as the animejs package under the MIT license. You point it at elements, describe the values you want them to reach, and it runs the whole sequence on a single frame loop. CSS properties, SVG attributes, plain HTML attributes, and ordinary JavaScript objects all take the same calls, which is why one library covers a loading spinner, a chart reveal, and a logo draw-on without three different tools.
The numbers are current as of December 2026. Version 5.0.0 shipped on 1 December 2026, the package has no runtime dependencies at all, and npm records about 4.9 million downloads a month. The repository passed 75,000 stars, and the source lives at the anime.js repository. The author, Julian Garnier, keeps the API shape across major versions and ships a migration guide for each jump.
Installation is one line, and the modern build is pure ESM:
npm i animejsimport { animate, stagger } from "animejs"animate(".card", { y: 24, opacity: 1, delay: stagger(60) })
That third line is the whole pitch. Nine words move twenty cards into place with a sixty millisecond offset between them. The same call accepts duration, loop, alternate, and any easing you name, and every property is optional.
Why motion ships last and gets noticed first
Motion is the first item cut from a sprint and the first thing a user feels. A dropdown that appears over 120 milliseconds reads as responsive. The same dropdown appearing instantly reads as cheap, even when the latency is identical. Nobody files a bug about it, and everybody notices it.
The usual reason it stays cut is cost. A CSS transition handles a hover state, and then the real sequence arrives: six cards that arrive one after another, a number counting up, a line that draws itself along a path. Each of those needs its own keyframes, its own timing, and its own cleanup code. By the fourth one the stylesheet has a section nobody wants to touch.
A timeline collapses that work into an object you can read. You add children in order, give each a duration, and the engine handles the queue. Change one number and the rest shifts with it. That is the difference between animation as a feature and animation as a chore.
☞ If a motion detail only appears in the first three seconds of a session, it is doing onboarding work. Treat the timing with the same care as the copy.
How the engine works
Four objects cover almost everything, and each one answers a different question.
- ❶
animate()moves values once. Targets can be a CSS selector, a DOM node, a NodeList, or an array. Values are absolute, relative, or returned by a function per target. - ❷
createTimeline()sequences several animations. Position parameters decide whether a child starts after the previous one, at the same time, or at an offset you give in milliseconds. - ❸
stagger()distributes a delay across a group. The delay can start from the first item, the centre, or a grid cell, and the grid can be three dimensional when the layout is. - ❹
onScroll()links a timeline to the scroll position, so a page can scrub an animation instead of playing it.
SVG gets its own helpers, because SVG is where most web motion lives and where most libraries give up. svg.draw animates a stroke along a path the way a pen would, svg.morphTo interpolates one path shape into another, and svg.motionPath sends an element along a curve. Text is handled by splitText, which breaks a string into words and characters, then into lines, so a headline can arrive letter by letter without extra markup.
Two more objects matter once the motion needs input. createAnimatable returns an object whose properties you set directly, which suits cursor followers and audio meters. createDraggable adds pointer dragging with velocity and snapping, plus optional bounds. Both run on the same clock, so a dragged card and a fading label stay in sync.
Under all of it sits one requestAnimationFrame loop. Every animation and timeline, plus every draggable, registers with the same engine. A page with twenty effects still runs a single loop instead of twenty competing ones.
What version 5 changed
Version 5, released at the start of December 2026, adds the piece that was missing for designers. The Anime.js editor reads the animation in your code, draws it as controls and a timeline in the browser, and writes your adjustments back into the source. You drag a keyframe, the file changes. That is a different deal from a timeline you build by hand and then describe to someone in a meeting.
The rest of the release is quieter and more useful day to day. Springs gained stretch(), which makes a spring settle in a given time while keeping its bounce. A muted parameter turns value updates off while keeping the timing intact, which is how you test a sequence without moving anything. utils.parseColor() reads hex, rgb(), hsl(), oklab(), and oklch() strings, so palette work no longer needs a converter.
The previous major release brought adapters. registerAdapter() teaches animate() about a target type it does not know, and an official three.js adapter animates objects, materials, lights, and cameras from the same API. If your product draws in WebGL, the animation layer is not a separate system any more.
Use cases
For a founder
- → A landing page built from a template needs to feel custom. One timeline brings the hero headline in by word, lifts the product screenshot, and holds the call to action for the last beat.
- → A dashboard launches and the numbers jump from zero. A counter animation over 800 milliseconds makes the first load look intentional instead of broken.
- → A pricing page has three plans and no motion designer. A staggered entrance takes an afternoon and separates the page from every competitor using the same layout.
For a designer
- → A handoff needs a motion spec. The editor turns the timing into visible tracks, so the developer reads the same curve you signed off on.
- → A logo needs an animated reveal for a deck.
svg.drawtraces the existing paths, so the mark does not have to be redrawn for motion. - → A prototype in our React UI kit gets a page transition that actually matches the intent, without waiting on a motion library evaluation.
For a coder
- → A React app needs scroll linked reveals.
onScroll()plus a timeline replaces a wrapper library and a hook stack. - → A chart library exports SVG and the client wants it animated.
svg.morphTohandles the shape change between two datasets. - → A mobile web build stutters. One engine loop and transform-only properties are a shorter fix than auditing a pile of independent CSS animations.
Frequently asked questions
Does anime.js work with React and Next.js?
Yes. The package is framework agnostic, so you import it inside a component and pass a ref or a selector as the target. In Next.js, calls that touch the DOM belong in useEffect or in a client component, which is the same rule every animation library follows.
How big is the bundle?
The full minified bundle is about 128 KB, and you rarely ship all of it. The package ships ES modules, so a bundler keeps only the functions you import. A page using animate and stagger carries a small fraction of that figure.
Can I use it in commercial work?
Yes. The license is MIT, which covers paid products, client work, and modification. Keep the license notice in the source and nothing has to appear in your interface. The project is funded by GitHub sponsors instead of a paid tier.
Do I still need CSS animations?
For hover states and simple fades, CSS is fine and costs nothing. Reach for the engine when you need a sequence, a stagger across many items, a value that depends on scroll position, or coordination between several elements. Mixing both on one page is normal.
Why it belongs in your stack
A product feels faster when the interface answers the click. That answer is a design decision, and it needs a tool that does not fight the rest of the page. anime.js covers CSS, SVG, text, and canvas targets from one API, runs one loop, and adds nothing to your dependency tree.
Start with one moment that matters, usually the first screen or the moment a result appears. The breakdown of scroll driven 3D animation shows how far a single timeline can carry a page, and the open source tools digest places it next to the rest of the stack we track. When the motion is about icons rather than layout, react-useanimations handles hover states and Amicro collects ready-made micro-interactions you can drop into a landing page.
For a designer working between Figma and code, the design and code kits and the other free resources follow the same pattern of one small tool that removes a specific chore.

