← ClaudeAtlas

animejslisted

This skill should be used when the user asks to "animate with anime.js", "use animejs", "add an animation" with timelines/staggers/springs, "animate on scroll", "make this draggable", "animate SVG" (draw lines, morph paths, motion paths), "split text and animate it", or when working in a project that imports from "animejs". Covers the v4 API (animate, createTimeline, stagger, onScroll, createScope) and v3→v4 migration.
webmilmind1/claude-plugins · ★ 1 · Web & Frontend · score 62
Install: claude install-skill webmilmind1/claude-plugins
# Anime.js v4 Anime.js (`animejs`, v4.x) is a lightweight JavaScript animation engine for CSS properties, transforms, SVG, DOM attributes, and plain JS objects. **v4 is a full API rewrite** — there is no default `anime()` function anymore; everything is a named import. ```js import { animate, createTimeline, createTimer, stagger, onScroll, utils, svg, text } from 'animejs'; ``` Docs: https://animejs.com/documentation — installed API truth lives in `node_modules/animejs/dist/`. ## Core: animate() ```js animate('.square', { x: '17rem', // transform shorthand (x, y, rotate, scale, skew…) rotate: { from: -180, to: 0 }, // per-property from/to scale: [ { to: 1.25, duration: 200 }, { to: 1, duration: 300 } ], // keyframes opacity: 0.5, duration: 800, delay: stagger(100), // stagger across targets ease: 'outElastic(1, .5)', // NOTE: 'ease', not 'easing'; no 'ease' prefix in names loop: 3, alternate: true, // v3 direction:'alternate' → alternate: true onComplete: (anim) => {}, // callbacks are onBegin/onUpdate/onComplete/onLoop }); ``` - Targets: CSS selector, element, NodeList, array, or plain object (`animate(obj, { prop: 100, onUpdate: ... })`). - Playback controls on the returned animation: `.play() .pause() .restart() .reverse() .seek(ms) .then()` (awaitable). - Eases are strings: `'out'`, `'inOutQuad'`, `'outElastic(amplitude, period)'`, `'cubicBezier(...)'`, `linear()`, `steps(n)`, `irregular(