PACKAGE · ANIMATION

gsap

GSAP is a framework-agnostic JavaScript animation library that turns developers into animation superheroes. Build high-performance animations that work in **every** major browser. Animate CSS, SVG, canvas, React, Vue, WebGL, colors, strings, motion paths,

WEEKLY DOWNLOADS 8.3M
STARS 31.3K
FORKS 2.5K
OPEN ISSUES 6
GZIP SIZE 28.0 kB
UNPACKED SIZE 6.3 MB
DEPENDENCIES 1
LAST UPDATED 11mo ago
DOWNLOAD TRENDS

gsap downloads · last 12 months

Download trends for gsap1 download series from Nov 2025 to Oct 2026. Use left and right arrow keys to inspect monthly values.07.2M14.3M21.5M28.6MNov 2025FebMayAugOct 2026
gsap
ABOUT GSAP

GSAP is a JavaScript animation library for creating and coordinating motion across web interfaces. It addresses the gap between basic style changes and detailed, timed animation sequences, letting developers animate CSS, SVG, canvas, colors, strings, and motion paths through a common library.

GSAP is framework-agnostic, so animation logic can be used without committing an application to a particular UI framework. Its stated design goals include high-performance animations and support for every major browser; it is aimed at developers who need control over timing, sequencing, and animated properties in interactive or visual experiences.

The central API pattern is to describe animations in JavaScript, targeting elements or values and specifying how they change over time. GSAP also provides timelines for organizing multiple animations into coordinated sequences, which can make complex timing easier to manage than a collection of independent effects; animations can target different supported types, including CSS and SVG properties.

GSAP can fit into projects using React or Vue as well as framework-free JavaScript, and its stated integration scope also includes canvas and WebGL workflows. Its topics include scroll, making it relevant to scroll-driven interfaces, while the library's broader property support can serve interface transitions, illustrations, and other animated content.

The package lists a 28.0 kB gzip bundle size and 6.3 MB unpacked size, so teams should consider the delivered bundle in the context of which features their application uses. Its reported 8.5M weekly downloads, 30.1K GitHub stars, 2.3K forks, and five open issues indicate an established project, though these figures do not replace checking current documentation and compatibility for a specific implementation.

GSAP is distributed under its Standard “no charge” license, and projects should review the license terms before choosing it. Animation still requires deliberate handling of timing, targets, and lifecycle: in framework applications, ensure animations are created and cleaned up in step with the elements they control, and verify behavior in the browsers and rendering contexts your application supports.

WHEN TO USE
  • Use `gsap` to animate CSS properties such as position, opacity, or transforms from JavaScript when transitions need explicit timing and sequencing.
  • Use GSAP timelines to coordinate multiple animations into a single ordered sequence, such as a staged interface reveal.
  • Choose GSAP when the same animation approach needs to target both HTML elements and SVG properties.
  • Use its canvas or WebGL animation capabilities when motion is part of a rendered visual scene rather than only a DOM interface.
  • Use motion paths when an element or visual value needs to follow a defined route over time.
  • Consider GSAP for scroll-related animation patterns, using it as part of an interface where motion responds to scrolling.
  • Use GSAP in React or Vue projects when animation behavior should be expressed with the same library across framework and non-framework code.
WHEN NOT TO USE
  • Avoid GSAP when a static page only needs a basic CSS transition; use CSS transitions or keyframes to avoid adding JavaScript animation logic.
  • Avoid it when animation must be driven entirely by a framework's existing state and transition mechanisms; use those built-in mechanisms instead of coordinating a separate animation system.
  • Avoid GSAP if the required target or rendering context is outside its stated support for CSS, SVG, canvas, WebGL, colors, strings, or motion paths; use an approach designed for that target.
  • Avoid adding GSAP when the application cannot accommodate its listed 28.0 kB gzip bundle size; use CSS-based motion or another smaller approach that meets the requirement.
  • Avoid selecting GSAP without reviewing its Standard “no charge” license; choose a library whose license terms fit the project if they do not.
  • Avoid using GSAP for animations that must be managed only through declarative markup or stylesheets; CSS keyframes provide a stylesheet-based alternative.
  • Avoid assuming that framework integration automatically handles animation lifecycle; use framework-managed transitions or explicitly manage animation creation and cleanup if that lifecycle work is unsuitable.

CORRECTIONS

Spot wrong data here?

A short note helps us fix it.

Anonymous · No account · No email back

COMPARISONS 4
gsap vs @formkit/auto-animate ★ 14.0K · 2.6M/wk gsap vs framer-motion ★ 35.6K · 72.8M/wk gsap vs animejs ★ 75.1K · 1.2M/wk gsap vs motion ★ 35.6K · 39.6M/wk