Animation
engine for
the web.
Fast, versatile and lightweight JavaScript library to animate anything on the web.
npm i animejs
Fast, versatile and lightweight JavaScript library to animate anything on the web.
npm i animejs
A powerful engine API to write animations, and a visual editor to fine-tune them.
Orchestrate animation sequences and keep callbacks in sync with a powerful Timeline API.
Split text into lines, words and characters, and scramble it with the built-in Text utilities.
Synchronise and trigger animations on scroll with the Scroll Observer API.
Animate CSS display, grid, flex and DOM order changes automatically with the Layout API.
Create stunning effects in seconds with the built-in Stagger utility function.
Morph shapes, follow motion paths, and draw lines easily with the built-in SVG utilities.
Animate 3D objects, materials and instanced meshes with a simplified 3D API.
Make animations respond to media queries easily with the Scope API.
Install Anime.js with one command:
npm i animejs
Explore the documentation, or learn more about the editor.
animate('h2', {
innerHTML: scrambleText({
cursor: '░▒▓█',
}),
});
const { words } = splitText('p');
animate(words, {
y: ['100%', '0%'],
delay: stagger(50),
});
animate('.probe', {
...createMotionPath('.orbit'),
});
animate(createDrawable('.orbit'), {
draw: '0 1',
});
animate('.orbit-a', {
d: morphTo('.orbit-b'),
});
animate(createDrawable('path'), {
draw: ['0 0', '0 1', '1 1'],
delay: stagger(40),
ease: 'inOut(3)',
autoplay: onScroll({ sync: true }),
});
const options = {
grid: [13, 13],
from: 'center',
};
createTimeline()
.add('.dot', {
scale: stagger([1.1, .75], options),
ease: 'inOutQuad',
}, stagger(200, options));
import 'animejs/adapters/three';
createTimeline({ loop: true })
.add(parts, {
x: random({ min: 6, max: 30 }),
delay: stagger(5, { from: 'random' }),
ease: 'inOut(3)',
});
const layout = createLayout('.cards', {
duration: 900,
ease: 'inOut(5)',
});
layout.update(({ root }) => {
root.classList.toggle('list');
});
createTimeline()
.add('.tick', {
y: '-=6',
duration: 50,
}, stagger(10))
.add('.ticker', {
rotate: 360,
duration: 1920,
}, '<');
createScope({
mediaQueries: {
portrait: '(orientation: portrait)',
}
})
.add(({ matches }) => {
const isPortrait = matches.portrait;
createTimeline().add('.circle', {
y: isPortrait ? 0 : [-50, 50, -50],
x: isPortrait ? [-50, 50, -50] : 0,
}, stagger(100));
});