greensock/GSAP
Media & DesignFramework-agnostic JavaScript animation library for animating CSS, SVG, canvas and WebGL in any major browser.
What GSAP does
GSAP is a dependency-free JavaScript animation library. Its core is a high-speed property manipulator that updates values over time, so it can animate CSS properties and attributes, SVG, canvas, WebGL, colors, strings, motion paths and plain JavaScript objects. It is framework-agnostic and works in every major browser. It is aimed at front-end developers and designers building UI motion, scroll effects and interactive web pages.
Optional plugins extend it for scroll-driven animation (ScrollTrigger, ScrollSmoother), SVG morphing (MorphSVGPlugin), text splitting (SplitText), motion paths (MotionPathPlugin), FLIP transitions (Flip), and normalized cross-browser event handling (Observer). gsap.matchMedia() helps build responsive, accessibility-aware animations. A separate @gsap/react package provides a useGSAP() hook for React.
Quick start
Pick one of the two installation routes below.
CDN (browser page): add the script tag before your own animation code:
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15/dist/gsap.min.js"></script>
The JSDelivr GSAP page lists core files and plugins.
npm (bundled app):
npm install gsap
Then import the core and any plugins you need, and register plugins before use:
import gsap from "gsap";
import ScrollTrigger from "gsap/ScrollTrigger";
import Flip from "gsap/Flip";
import Draggable from "gsap/Draggable";
gsap.registerPlugin(ScrollTrigger, Draggable, Flip);
The README also shows an gsap/all import that re-exports all tools except members-only plugins. Plugins must be registered before they are used. Once loaded, call animation methods such as gsap.to(...) on targets; the getting started guide, demos and cheat sheet show complete animations.
Constraints
- The npm package uses ES modules; a
/dist/directory contains UMD builds for extra compatibility. - GSAP itself has zero dependencies, but plugins must be imported and registered separately.
- React users need the separate
@gsap/reactpackage and should follow the React guide. - The repository does not declare a license in the provided metadata. The README instead points to GreenSock's standard "no charge" license; check it before commercial use.
- Plugin documentation, forums and bug reporting live on gsap.com and GitHub Issues.
HotRepo's take
GSAP recorded 1,307 new stars in the monthly JavaScript list snapshot dated 2026-11-01, reaching position 14 on that list, with 30,007 total stars. That single monthly record supports the read that a long-established (created 2012) animation library still attracts a meaningful monthly audience in the JavaScript ecosystem. The data covers one monthly period only, so it does not indicate a sustained trend, and the monthly JavaScript rank is not an all-language daily rank. The README's own framing — 12 million sites and a free full toolset since Webflow's acquisition — explains why the library remains a default choice for scroll and SVG animation rather than a new entrant.
Written by AI from the project's README, updated . The project's own docs are the source of truth.