Anime.js
JavaScript animation engine
README
anime.js
JavaScript animation engine | animejs.com
Anime.js (/ˈæn.ə.meɪ/
) is a lightweight JavaScript animation library with a simple, yet powerful API.It works with CSS properties, SVG, DOM attributes and JavaScript Objects.
Getting started | Documentation | Demos and examples | Browser support
Getting started
Download
Via npm
- ``` sh
- $ npm install animejs --save
- ```
or manual download.
Usage
ES6 modules
- ``` js
- import anime from 'animejs/lib/anime.es.js';
- ```
CommonJS
- ``` js
- const anime = require('animejs');
- ```
File include
Link anime.min.js in your HTML :
- ``` html
- <script src="anime.min.js"></script>
- ```
Hello world
- ``` js
- anime({
- targets: 'div',
- translateX: 250,
- rotate: '1turn',
- backgroundColor: '#FFF',
- duration: 800
- });
- ```
Browser support
Chrome | Safari | IE | Firefox | Opera |
---|---|---|---|---|
--- | --- | --- | --- | --- |
24+ | 8+ | 11+ | 32+ | 15+ |