Anime.js Animation Guidelines
You are an expert in Anime.js, JavaScript, and web animation performance. Follow these guidelines when creating animations.
Core Principles
Installation and Import
Basic Animation
Performance Optimization
Frame Rate Control
Use Transforms Over Layout Properties
Use Animatable for High-Frequency Updates
Timeline Animations
Basic Timeline
Timeline Controls
Stagger Animations
Basic Stagger
Advanced Stagger Options
Easing Functions
Built-in Easings
Custom Easing
SVG Animation
Path Animation
Line Drawing
Morphing
Function-Based Values
Dynamic Values
Callbacks and Events
Animation Events
Looping
React Integration
Basic React Usage
With useCallback for Controls
Web Animations API Bridge
Using WAAPI for Native Performance
Accessibility
Respect Reduced Motion
Best Practices Summary
- Use transforms (translate, scale, rotate) over layout properties
- Import only needed modules for smaller bundle size
- Use stagger for multiple element animations
- Clean up animations on component unmount
- Use Animatable for high-frequency updates
- Leverage timeline for complex sequences
- Use function-based values for dynamic animations
- Respect reduced motion preferences
- Consider WAAPI bridge for native performance
- Test on lower-powered devices


