gsapjs
Features
The GSAP (GreenSock Animation Platform) module integrates the industry-leading JavaScript animation library into Drupal. It allows site builders and themers to use GSAP’s core and optional plugins directly within their themes or custom modules, without manual library setup.
- Automatic loading: Attach GSAP globally with a single toggle.
- Local or CDN: Prefer a local build under
libraries/gsapor use official jsDelivr/UNPKG CDNs as fallback. - Granular control: Enable only the GSAP core or select from free and Club GreenSock plugins (local-only for Club plugins).
- Visibility rules: Restrict loading to certain themes or pages using flexible include/exclude logic.
- Optional UI: The companion
gsapjs_uimodule provides a full configuration form under Configuration → User interface → GSAP. - No jQuery dependency: Fully native JavaScript integration.
Post-Installation
After enabling gsapjs, GSAP core will automatically attach globally if the UI submodule is disabled. When gsapjs_ui is enabled, visit the GSAP settings page to:
- Toggle global loading.
- Select the loading method (Local/CDN).
- Choose core and plugin files to attach.
- Set build variant (minified or unminified).
- Configure theme-based and path-based visibility rules.
Save changes and clear caches to apply new settings.
Additional Requirements
- A GSAP build in
libraries/gsapfor local mode, or a working internet connection for CDN mode. - For Club GreenSock plugins, you must have a valid Club license and manually place plugin files in your local
libraries/gsapdirectory.
Recommended modules/libraries
- GSAP JS UI (included submodule) for configuration control.
Similar projects
While there are modules that integrate animation libraries (e.g., Anime.js or Velocity.js integrations), gsapjs is tailored for the GSAP ecosystem, supporting both free and premium plugins, local/CDN switching, and granular visibility rules, making it unique for high-performance animation workflows in Drupal.
Supporting this Module
If you find this module useful, consider contributing patches, reporting issues, or sponsoring development via the maintainer’s preferred platform.