Anime brings Anime.js to Drupal. It makes the library available to JavaScript in themes and custom modules.
Anime.js can animate CSS properties, SVG, DOM attributes, and JavaScript objects. Animations are written in JavaScript; the module does not provide a visual animation editor.
Choosing a module version
- Anime 1.x: Supports Drupal 8.8, 9, 10, and 11. Recommended for existing sites using the stable 1.x release line. It does not support Drupal 12.
- Anime 2.x (beta): Targets Drupal 11.3+ and Drupal 12. Choose this line when preparing for Drupal 12, and check its release status before using it on a production site.
These are versions of the Drupal module, not versions of the Anime.js library. Both module lines support local Anime.js 3 and 4. You do not need Anime 2.x just to use Anime.js 4. See the available releases.
Features
- Integrates Anime.js with Drupal's asset library system.
- Detects supported local Anime.js 3.x and 4.x browser bundles.
- Prefers Anime.js 3 when both major versions are installed locally.
- Uses Anime.js 3.2.2 from a CDN when no supported local build is found.
- Reports the selected library and any ignored or invalid copies on Drupal's status report.
Installation
- Install a module release compatible with your Drupal version. For the stable 1.x line, use
composer require 'drupal/anime:^1.0'. For 2.x, follow the selected release instructions. - Enable the Anime module.
- Optionally install a local Anime.js browser bundle. For v3, use
/libraries/anime/lib/anime.min.js. For v4.2+, use/libraries/anime/dist/bundles/anime.umd.min.js. Other supported locations and older v4 layouts are described in the README.
A local library is optional. Without one, the module falls back to the Anime.js 3.2.2 CDN. Clear Drupal caches after adding, replacing, or removing local library files. The selected version is shown at /admin/reports/status.
Usage
Add your animation code to a JavaScript file in your theme or module. Use the API for the Anime.js major version that is loaded.
Anime.js 3
anime({ targets: '.animated-element', translateX: 250, duration: 800 });
Anime.js 4.x (UMD)
anime.animate('.animated-element', { translateX: 250, duration: 800 });
Both examples move an element 250 pixels to the right. Anime.js 3 uses the anime() function, while Anime.js 4 uses anime.animate().
Note: Anime.js 3 and 4 use different APIs. Existing v3 animations are not automatically converted to v4. When both versions are installed locally, the module loads v3 by default to preserve existing integrations.
Documentation and support
Similar projects
- Scene — timeline-based animation
- Vivus — SVG drawing animations
- Textimate — text animation effects
- Splitting.js — text splitting for visual effects
Use animations thoughtfully and respect reduced-motion preferences.
Project information
- Project categories: Developer tools, Media, Performance
71 sites report using this module
- Created by mahyarsbt on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
First beta with Drupal 11/12 support and automatic Anime.js 3/4 library detection.
Development version: 2.0.x-dev updated 29 Oct 2026 at 19:05 UTC

