animejs

Lightweight JavaScript animation library with a tiny footprint and a powerful, expressive API.

animejs

General JS

Lightweight JavaScript animation library with a tiny footprint and a powerful, expressive API.

Fit

Bundle (gzip)

40.3 kB

116.8 kB raw

Install size includes transitive dependencies. Bundle size is gzipped browser payload.

Freshness

The Problem

Sometimes you want richer motion than raw CSS keyframes allow — staggered sequences, motion along an SVG path, morphing values — but pulling in a heavy engine feels like overkill for a landing page or a single hero animation.

What It Does

Anime.js animates CSS properties, SVG attributes, DOM attributes, and plain JavaScript objects through one small API. It has first-class support for keyframes, staggering, timelines, and SVG line drawing, making it a sweet spot between hand-written CSS and a full animation platform.

Installation

bash
npm install animejs

Usage Example

js
import anime from 'animejs';

anime({
  targets: '.dot',
  translateX: 250,
  scale: [1, 1.5],
  delay: anime.stagger(100),
  direction: 'alternate',
  loop: true,
  easing: 'easeInOutQuad',
});

Related packages