Anime.js v4 — Web Animation Skill

SkillDev tools

Comprehensive guide to using Anime.js v4 for JavaScript-driven web animations, timelines, SVG animations, scroll effects, draggable interactions, and stagger patterns.

Instructions available. Your AI can read the instructions. Execution depends on the setup they require.

Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.

Then ask your AI: use the Anime.js v4 skill

What this skill tells your AI

The instructions your AI receives, as published by bidewio/better-openclaw in skills/animejs-animate/SKILL.md and read by ahel’s review.

When to use

  • Lightweight JavaScript animations (smaller than GSAP)
  • SVG path animations and morphing
  • Timeline-based sequences
  • Stagger effects on multiple elements
  • Draggable interactions

Key APIs

Basic animation

import anime from "animejs";

anime({
  targets: ".element",
  translateX: 250,
  opacity: [0, 1],
  duration: 800,
  easing: "easeOutExpo",
});

Timeline

const tl = anime.timeline({
  easing: "easeOutExpo",
  duration: 750,
});

tl.add({ targets: ".header", translateY: [-30, 0], opacity: [0, 1] })
  .add({ targets: ".content", translateY: [20, 0], opacity: [0, 1] }, "-=400")
  .add({ targets: ".cta", scale: [0.9, 1], opacity: [0, 1] }, "-=300");

Stagger

anime({
  targets: ".grid-item",
  scale: [0.5, 1],
  opacity: [0, 1],
  delay: anime.stagger(100, { grid: [4, 4], from: "center" }),
});

SVG path animation

anime({
  targets: "path",
  strokeDashoffset: [anime.setDashoffset, 0],
  duration: 2000,
  easing: "easeInOutSine",
});

v4 changes from v3

  • ES module support by default
  • New createTimeline() API
  • createDraggable() for drag interactions
  • Scroll-linked animations with createScope()
  • Improved TypeScript support

Performance tips

  • Animate transform and opacity only for 60fps
  • Use will-change: transform on animated elements
  • Batch DOM reads before animation starts
  • Remove completed animations to free memory

Common pitfalls

  • Animating layout properties (width/height) → use transform instead
  • Not cleaning up in SPAs → store and pause/remove references
  • SVG animations not working → check stroke-dasharray is set

Tips for AI Agents

  • Ask if Anime.js is already installed or needs adding.
  • Confirm animation style (entrance, scroll, interaction, SVG).
  • Consider prefers-reduced-motion for accessibility.

Signals

GitHub stars
58
Forks
6
Last commit
Aug 2026
Advanced
Item type
skill
Key
animejs-animate
Source
github.com/bidewio/better-openclaw