Web Development
GSAP: What It Is, What You Can Build and Where to Start
GSAP (GreenSock Animation Platform) is a JavaScript library for animation. Its job is to change values over time: an element's position, a color, the stroke of an SVG or any number on an object. Its README calls it a "framework-agnostic" library that animates "anything JavaScript can touch", and since version 3.13 it is free with every plugin included, commercial projects too.
It goes back to the Flash era. Its about page says it has been part of web animation for over 15 years, "evolving from the days of ActionScript". In JavaScript it solves a concrete problem: getting an animation to look the same in every browser without the code fighting each one. The README sums it up: "GSAP works around countless browser inconsistencies".
Take a product card that enters in three steps: the photo first, then the price, then the buy button. In CSS each step gets a fixed animation-delay, and changing the duration of one means recomputing the rest. Once the team also wants to pause the entrance or play it backwards, CSS runs out of road. In GSAP that sequence is an object, and pausing, reversing or restarting it takes one line.
This post kicks off a GSAP series made up of this hub, eleven short posts that each cover one part of the library, and a final tutorial that puts it all together in an animated landing page. The hub covers when GSAP beats CSS, what the license says (it is Webflow's own and comes with conditions), how to install it without a bundler and what each plugin is for. A showcase of four live mini demos, running GSAP 3.15.0, shows a tween, SplitText, Flip and Draggable. The reading order for the series sits near the end. The series assumes JavaScript and no prior GSAP experience.
When GSAP beats CSS
GSAP earns its place through control. The Timeline docs frame it as a question: "what if you want to pause() the whole sequence or restart() it or reverse() it on-the-fly or repeat it twice?".
Scrolling is a different story. CSS can already drive animations from the scroll position with animation-timeline and its scroll() and view() functions, and all four major browsers support it since Firefox 159 shipped on October 27, 2026. ScrollTrigger, GSAP's scroll plugin, adds other things: start and end relative to an element, a scrub that smooths the motion, debug markers, and a whole timeline driven by the scroll.
A single state change tied to :hover or a class stays in CSS. A sequence, or an animation the user controls, is where GSAP pays for itself. For scrolling, the sensible path is CSS first and ScrollTrigger once those extras are needed; post 5 of the series covers them in depth.
| Need | CSS transition or animation | GSAP |
|---|---|---|
| One state change (hover, focus) | Enough | Overkill |
| Multi-step sequence | Hand-tuned fixed delays | Timeline with relative positions |
| Pause, reverse, restart | Limited | pause(), reverse(), restart() |
| Progress tied to scroll | animation-timeline: scroll() (native) | ScrollTrigger with scrub, markers and timelines |
The license: free, with conditions
On October 15, 2024, the GSAP blog announced that "GSAP has been acquired by Webflow". Version 3.13, announced April 29, 2025, brought the part developers care about: "GSAP is now 100% FREE including ALL of the bonus plugins like SplitText, MorphSVG, and all the others that were exclusively available to Club GSAP members", followed by "even for commercial use!".
The license is Webflow's own, the Standard "No Charge" GSAP License, effective April 30, 2025 and last modified May 30, 2025. In short:
- Allowed: using GSAP "on any website, web application, or digital interface by any person or entity", including companies that compete with Webflow in other areas.
- Not allowed without prior written consent: using it in no-code visual animation tools that compete with Webflow's own animation builder.
- Also not allowed: removing or altering proprietary notices or branding, and reverse engineering GSAP to build competing products.
- Subject to change: "Webflow reserves the right to update or modify this GSAP License at any time". Anyone who rejects a revision can keep using earlier versions under the terms they had.
A website, an app or a blog like this one is a permitted use; the FAQ on the license page is explicit: "Commercial usage is covered under the standard license." The fine print matters to anyone building a visual animation editor. For everyone else, recording the GSAP version and the date of the accepted license is enough.
Installing without a bundler: one script per file
The core plus the plugins actually in use is all it takes, every one from unpkg and pinned to the same version:
<script src="https://unpkg.com/gsap@3.15.0/dist/gsap.min.js"></script>
<script src="https://unpkg.com/gsap@3.15.0/dist/ScrollTrigger.min.js"></script>
<script src="https://unpkg.com/gsap@3.15.0/dist/SplitText.min.js"></script>
<script>
gsap.registerPlugin(ScrollTrigger, SplitText);
</script>
Every plugin is one more file in dist/, following the same pattern; the showcase in this post loads Flip.min.js and Draggable.min.js that way. When a file fails to load, say because of a typo in its name, gsap.registerPlugin() throws a ReferenceError: the plugin's variable was never defined.
The series pins 3.15.0, released April 13, 2026, the version its demos were tested with. 3.15.1 came out on November 4, 2026 and is now the latest tag on npm. What matters is that the core and the plugins match: a 3.15.0 core with a 3.15.1 ScrollTrigger loads with no error and no warning, so nothing flags the mismatch. Moving to another version means changing the number in every URL at once.
With plain script tags, the installation guide says "GSAP will attempt to auto-register the plugins as long as the core has already loaded, but we still recommend registering plugins". It is one line, and per the registerPlugin docs it only has to run once.
For ES modules, the package's package.json declares "module": "index.js":
<script type="module">
import { gsap } from "https://unpkg.com/gsap@3.15.0/index.js";
import { ScrollTrigger } from "https://unpkg.com/gsap@3.15.0/ScrollTrigger.js";
gsap.registerPlugin(ScrollTrigger);
</script>
Modules behave differently in three ways:
- Registering is required. Without
gsap.registerPlugin(ScrollTrigger),ScrollTrigger.create()logs "Please gsap.registerPlugin(ScrollTrigger)" and throws aTypeError. - Paths leave out
dist/. Animportfromdist/ScrollTrigger.jsfails with aSyntaxError, because that file does not exportScrollTrigger. - The two styles do not mix. A
<script>tag and animportload two separate copies of GSAP: the importedgsapis not the same object aswindow.gsap.
A site that sends a Content Security Policy needs https://unpkg.com in script-src; that is how the showcase in this post runs. Without it, the browser blocks the download and nothing runs.
The GSAP map: the core and the plugins
Everything starts with the core. In the words of its documentation, "The gsap object serves as the access point for most of GSAP's functionality", with methods that create and control tweens and timelines, "two of the most important concepts to understand". Tweens and staggers belong to post 2, on the core; timelines get post 3.
The rest is plugins. The plugins page explains: "A plugin adds extra capabilities to GSAP's core. This allows the GSAP core to remain relatively small and lets you add features only when you need them." Version 3.15.0 ships 25 .min.js files in dist/: the core plus 24 plugins and helpers. The docs group them like this.
Scroll
- ScrollTrigger ties an animation to an element's position on the page.
- ScrollTo animates the scroll position of the window or of an element, an animated
window.scrollTo(). - ScrollSmoother adds vertical smooth scrolling to a page built on ScrollTrigger, which it requires.
ScrollTrigger and ScrollTo are covered in post 5.
Text
- SplitText splits text into characters, words or lines, each in its own element, so they can be animated one by one.
- ScrambleText fills the text with random characters that keep refreshing while the new text is revealed.
- TextPlugin replaces text one character at a time, or one word at a time with
delimiter: " ".
All three are covered in post 6.
SVG
- DrawSVG progressively reveals or hides the stroke of a
<path>,<line>,<rect>and other shapes. - MorphSVG morphs one
<path>into another by animating the data in itsdattribute. - MotionPath moves any object along a path.
- MotionPathHelper makes that path editable in the browser by dragging its points.
MotionPath and its helper belong to post 10; DrawSVG and MorphSVG, to post 11.
UI
- Flip moves between two states without jumps, even when the DOM structure changes underneath.
- Draggable makes almost any element draggable, spinnable or tossable, with a mouse or a finger.
- Inertia glides a property smoothly to a stop, honoring its initial velocity. Paired with Draggable, whatever gets thrown slows down with momentum.
- Observer senses wheel, touch and pointer input through one API on any device.
Flip gets post 7, Draggable and Inertia post 8, and Observer post 9.
Eases
- CustomEase builds any easing curve, drawn in the Ease Visualizer or pasted as an SVG path.
- CustomWiggle adds a wiggle with an amount and a type; it requires CustomEase.
- CustomBounce builds adjustable bounces: "it lets you set the bounce and (optionally) a squash and stretch". It requires CustomEase.
- EasePack holds RoughEase (a jagged effect), SlowMo (slows down, runs linear, speeds up) and ExpoScaleEase (corrects the apparent speed of a scale).
All four are covered in post 4.
Other
- Physics2D tweens
xandyfrom velocity, angle, gravity, acceleration and friction. It is not a physics engine and has no collision detection. - PhysicsProps tweens any numeric property from velocity and acceleration, with no fixed end value.
- GSDevTools provides a UI to play back and debug animations. Its official snippet uses jsDelivr; behind a CSP like this blog's, it has to load from unpkg.
- EaselPlugin and PixiPlugin animate EaselJS and PixiJS properties.
Physics goes to post 12, and GSDevTools to post 3, alongside timelines.
The showcase: four live demos
Four mini demos, each with its own button. The tween and SplitText play by themselves the first time the showcase comes into view. The Draggable chip never leaves its box, and for anyone who cannot drag it, its button moves it.
Tween + stagger
SplitText
Letter by letter
Flip
Draggable
Drag the chip, or move it with its button.
Here is the essential code for each one:
// Tween: five boxes rise as a staircase
gsap.from(".box", { y: 120, opacity: 0, stagger: 0.12 });
// SplitText: the heading builds letter by letter
SplitText.create(".title", {
type: "chars",
mask: "chars",
onSplit: (self) => gsap.from(self.chars, { yPercent: 100, stagger: 0.04 })
});
// Flip: record the state, change the layout, animate the difference
const cards = document.querySelector(".cards");
const state = Flip.getState(".card");
cards.classList.toggle("list");
Flip.from(state, { duration: 0.6, stagger: 0.04 });
// Draggable: the chip stays inside its box
Draggable.create(".chip", { type: "x,y", bounds: ".stage" });
It is the bare minimum to see each plugin move, and it leaves out things the showcase handles:
- It assumes the elements exist. Without
.box, GSAP only logs a warning ("GSAP target .box not found"). Without.cards, though,cardsisnullandcards.classListthrows aTypeError; without.stage,Draggable.create()throws as well. - It declares top-level constants. Pasted twice on the same page, in two
<script>tags, it fails with aSyntaxErrorbecausecardsalready exists. Inside a function or a block there is no clash. - It ignores the reduced-motion preference. It always animates. The showcase builds its animations inside
gsap.matchMedia()and, with that preference set, does not start on its own.
Which plugin fits which job
| To… | Plugin | Series post |
|---|---|---|
| Animate on scroll | ScrollTrigger, or CSS animation-timeline if it is simple | 5 |
| Scroll the page to a section | ScrollTo | 5 |
| Bring in a heading by letters or lines | SplitText | 6 |
| Make text decode or type itself | ScrambleText, TextPlugin | 6 |
| Reorder a grid or turn it into a list | Flip | 7 |
| Drag and throw | Draggable + Inertia | 8 |
| React to the wheel or a swipe without scrolling | Observer | 9 |
| Move something along a path | MotionPath | 10 |
| Draw an SVG stroke | DrawSVG | 11 |
| Morph one shape into another | MorphSVG | 11 |
| Get a custom ease, a bounce or a wiggle | CustomEase, CustomBounce, CustomWiggle | 4 |
| Build a sequence that can be inspected | Timeline + GSDevTools | 3 |
| Make something fall with gravity or slow with friction | Physics2D | 12 |
What the series leaves out
- CSSRulePlugin: still in
dist/, but its docs state that "CSSRulePlugin has been deprecated in favor of using CSS variables". - ScrollSmoother: it needs all of the page content inside one element, wrapped by another that acts as the viewport. A single post cannot do that without changing the site layout.
- PixiPlugin and EaselPlugin: only useful in a project that already runs PixiJS or EaselJS.
- useGSAP(): built for React and installed through npm. Its guide describes it as a replacement for
useEffect()that cleans up withgsap.context(). This series works without a bundler.
Three good habits from day one
- A pinned version. The same one in every URL, such as
gsap@3.15.0. - Reduced motion. Animations are created inside gsap.matchMedia() with the
(prefers-reduced-motion: reduce)condition, and the final state lives in the CSS. That is how the showcase works: with that preference it never starts on its own, but its buttons still play each demo. - Cleanup. Each demo or component goes in a gsap.context(), which collects what it creates so one
revert()undoes it all, and scopes selectors to its container.
All three are explained with code in post 2, on the core.
Reading order for the series
- GSAP Core: Tweens, Staggers, quickTo and Utilities
- GSAP Timelines in Depth: Labels, Nesting and GSDevTools
- Custom Eases in GSAP: CustomEase, CustomWiggle, CustomBounce and EasePack
- ScrollTrigger in Depth: Pin, Snap, Callbacks and ScrollTo
- Animating Text with GSAP: SplitText Lines, ScrambleText and TextPlugin
- GSAP Flip: Animate Layout Changes Without the Math
- Draggable and Inertia: Drag, Throw and Snap with GSAP
- GSAP Observer: Wheel, Touch and Pointer in One API
- GSAP MotionPath: Animate Elements Along an SVG Path
- DrawSVG and MorphSVG: Draw and Morph SVG with GSAP
- Simple Physics with GSAP: Physics2D and PhysicsProps
- Complete GSAP Tutorial: Build an Animated Landing Page from Scratch
FAQ
Is GSAP free for commercial projects?
Yes. Since 3.13 all of GSAP is free, plugins included, for commercial use as well. The exception is no-code visual animation tools that compete with Webflow.
Does GSAP need a bundler?
No. One <script> tag per file from unpkg is enough (the core plus each plugin in use), and index.js can also be imported as an ES module.
Does GreenSock still own GSAP?
No. Webflow acquired it in October 2024, but the team from before the acquisition still maintains it. The 3.13 announcement puts it this way: "GSAP will continue to be actively maintained and supported by us, Jack, Cassie, and Rodrigo".
Where to start
CSS for state changes, GSAP for sequencing and reader control. With the version pinned and reduced motion handled from the start, the next step is post 2, on the core. To take the same approach into 3D, there is the tutorial Three.js with WebGPU and TSL: your first animated scene without a bundler.
References
- GSAP — Standard "No Charge" GSAP License
- GSAP — 3.13 release (everything free)
- GSAP — Webflow acquires GSAP
- GSAP — The gsap object
- GSAP — Plugins
- GSAP — Installation guide
- MDN — animation-timeline
- GSAP — gsap.matchMedia() documentation
Tags
Share this post
Subscribe
Get the latest posts delivered right to your inbox.
Leave a comment