Explainers · Explainer
What Is GSAP in WordPress? Explained

Short answer
GSAP, the GreenSock Animation Platform, is a JavaScript library for smooth animations such as fades, slides and scroll effects. It is not built into WordPress, so you load it through your theme, a code snippet, a plugin or a page builder that uses it.
Key takeaways
- GSAP is a JavaScript animation library, not a WordPress plugin.
- GSAP and its plugins are now free under the standard license.
- Load it with wp_enqueue_script or a snippet plugin.
- ScrollTrigger links animations to scrolling.
- Respect reduced motion settings and load GSAP only where needed.
What is GSAP in WordPress?
GSAP, short for GreenSock Animation Platform, is a JavaScript animation library that WordPress sites load to create smooth motion such as fades, slides, scroll effects and animated text.
GSAP is not a WordPress plugin or a built-in feature. It is a standalone script that works on any website, and WordPress users add it through a theme, a plugin, a page builder or a few lines of code.
Developers like it because it handles timing, easing and browser quirks for you. You describe what should move and how, and GSAP takes care of the frame-by-frame work.
| Question | Short answer |
|---|---|
| What type of tool is it? | A JavaScript animation library |
| Is it part of WordPress core? | No, you add it yourself |
| Does it cost money? | No, GSAP and its plugins are free under its standard license |
| Do you need to code? | Usually some JavaScript, unless a plugin or builder wraps it |
| Popular add-on | ScrollTrigger for scroll-based animation |
What can GSAP do on a WordPress site?
GSAP can animate almost any visual property, including position, size, opacity, colour, SVG shapes and CSS variables, and it can link those animations to scrolling.
Common uses on WordPress sites include:
- Hero sections where headings and images slide in on page load.
- Scroll effects that reveal sections, pin panels or create parallax motion.
- Text animation that splits headings into words or letters.
- SVG animation for logos, icons and illustrations.
- Timelines that play several animations in sequence.
The GSAP documentation shows the core tween methods, such as gsap.to and gsap.from, plus timelines for chaining steps.
The most popular extra is ScrollTrigger. Its ScrollTrigger documentation explains how to start, scrub and pin animations as the user scrolls.
Is GSAP free to use in WordPress?
Yes, GSAP is free to use, including the bonus plugins that used to require a paid Club GreenSock membership, under the GSAP standard license.
Webflow bought GreenSock and later announced that GSAP became 100% free, with every plugin included. The GSAP team covered the change in its 3.13 release notes.
Free does not mean open source with no rules. The standard license has its own terms, so read them on the GSAP site if you build commercial products, themes or tools that you resell.
For a normal business site or client project, the license is rarely an issue. Still, check the current terms rather than relying on older tutorials, which often mention paid tiers that no longer apply.
How do you add GSAP to WordPress?
You add GSAP by enqueuing its script file in your theme or a code snippet plugin, by using a plugin that loads it for you, or through a page builder that has GSAP-powered features.
The cleanest method for developers is wp_enqueue_script(). You register the GSAP file, then your own animation script with GSAP listed as a dependency, so WordPress loads them in the right order.
You can load GSAP from a CDN or host the file in your theme. The GSAP site lists current install options, including npm and CDN links.
Not comfortable editing theme files? A snippet plugin can hold the enqueue code instead. Our guide on using the WPCode plugin shows how to add header and footer scripts safely.
For more options on placing code, see how to add code to WordPress. It compares child themes, snippet plugins and custom plugins.
Do you need a plugin to use GSAP?
No, you do not need a plugin, but plugins and page builders can make GSAP usable without writing JavaScript.
Search the plugin directory for GSAP and you will find several options. Some only load the library, while others add visual controls for building animations.
Check each plugin's update date, active installs and support forum before using it. Animation plugins that load large scripts on every page can slow your site.
Some page builders and block plugins use GSAP behind the scenes for their motion effects. In that case you get GSAP-quality animation through normal settings panels.
How is GSAP different from CSS animations?
CSS animations handle simple transitions well, while GSAP gives you precise control over timing, sequencing, scroll links and complex effects that are hard or impossible in CSS alone.
| Need | CSS animations | GSAP |
|---|---|---|
| Simple hover or fade | Good fit | Works, but overkill |
| Chained sequences | Hard to manage | Easy with timelines |
| Scroll-linked effects | Limited | Strong with ScrollTrigger |
| Pause, reverse, seek | Limited | Built in |
| SVG morphing | Very limited | Supported with plugins |
| Extra file size | None | Adds a script |
For a button hover, CSS is the better choice. It costs nothing in file size and runs smoothly.
For a story-style landing page with pinned sections and timed reveals, GSAP saves hours of work and gives more reliable results across browsers.
If you only need basic effects, read can you do animations in WordPress. It covers simpler built-in and builder options.
Does GSAP slow down WordPress sites?
The core GSAP file is fairly small, so it rarely causes problems alone, but loading many plugins, animating heavy elements or running effects on every page can hurt performance.
Keep performance in check with a few habits:
- Load GSAP only where needed. Enqueue it on pages that actually use animation.
- Animate transforms and opacity. These are cheaper for browsers than width, height or top and left.
- Defer scripts. Load animation code after main content so it does not block rendering.
- Avoid animating huge images or long lists all at once.
Test pages with a speed tool after adding animation. If a score drops sharply, check which scripts load and where.
How do you make GSAP animations accessible?
Respect the user's reduced motion setting, keep content readable without animation, and avoid flashing or fast movement that can cause discomfort.
Browsers expose a prefers-reduced-motion media feature that you can check in JavaScript. GSAP's matchMedia helper makes it easy to turn effects off or tone them down for those users.
Never hide important text behind an animation that might fail to run. If JavaScript breaks, visitors should still see the content.
Why are GSAP animations not working in WordPress?
Most problems come from the script not loading, loading in the wrong order, running before the page elements exist, or a caching or optimization plugin changing how scripts load.
Check these points first:
- Open the browser console. An error like gsap is not defined means the library did not load before your code.
- Check dependencies. Your script must list GSAP and any plugins as dependencies.
- Register plugins. ScrollTrigger and other plugins need gsap.registerPlugin before use.
- Exclude scripts from optimization. Combine and delay settings in speed plugins can break load order.
- Recalculate after layout changes. Lazy-loaded images can shift positions, so refresh ScrollTrigger after they load.
If your animations come from Elementor rather than custom GSAP code, see our guide on Elementor animations not working instead.
Frequently asked questions
Is GSAP better than Elementor motion effects?
GSAP offers far more control, including timelines, scroll scrubbing and SVG animation, but it needs code or a plugin that exposes it. Elementor motion effects are easier for simple entrance and scroll effects. Many sites use builder effects for basics and GSAP for special sections.
Does GSAP work with the block editor?
Yes. GSAP animates elements on the front end, so it works with any content the block editor outputs. Add a custom CSS class to a block in the Advanced panel, then target that class in your GSAP script.
Can I use GSAP ScrollTrigger in WordPress for free?
Yes. ScrollTrigger is included at no charge along with the other GSAP plugins under the current standard license. Load the ScrollTrigger file after the core GSAP file and register it before creating scroll animations.
Do I need to know JavaScript to use GSAP?
For custom work, basic JavaScript helps a lot, since you write selectors, tweens and timelines. If you do not code, look for a WordPress plugin or page builder that offers GSAP-based animation through visual settings.
Will GSAP animations affect SEO?
Animations do not directly hurt rankings, but heavy scripts can slow pages and hidden content can confuse users if scripts fail. Keep text visible in the page HTML, load scripts efficiently and test page speed after adding effects.
Sources
- GSAP Documentation GSAP
- ScrollTrigger GSAP
- Webflow makes GSAP 100% free Webflow
- wp_enqueue_script() WordPress Developer Resources
- prefers-reduced-motion MDN Web Docs
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
Related guides
About the editors
Researched from the primary sources listed above and checked against our editorial rules before publishing.


