Overview
GreenSock Animation Platform (GSAP) is a suite of JavaScript tools for building high-performance, complex, and precise animations on the web. Founded in 2007, GSAP focuses on delivering smooth animations across various browsers and devices by directly manipulating CSS properties, SVG, React, Vue, Canvas, and generic JavaScript objects. The platform is engineered to prevent common animation-related browser inconsistencies and performance bottlenecks, which can arise from direct DOM manipulation or less optimized animation techniques as discussed in web animation performance guides.
GSAP is particularly well-suited for developers who require fine-grained control over animation sequences, including timing, easing, and dependencies between multiple animated elements. Its core offering, the GSAP library, provides a robust API for creating tweens (single-property animations) and timelines (sequences of tweens). This timeline feature is central to its utility, allowing developers to choreograph intricate animations with precise control over their start times, durations, and overlaps.
The library shines in scenarios demanding interactive experiences, such as rich user interfaces, data visualizations, and game-like elements on the web. Developers often choose GSAP for its reliability and the consistent behavior it exhibits across different environments. It is utilized across a range of projects, from marketing websites with elaborate intros to applications with dynamic dashboards. The platform’s modular structure allows developers to include only the necessary components, minimizing the overall file size for front-end deployments. Furthermore, GSAP’s plugin ecosystem extends its capabilities, offering specialized tools like ScrollTrigger for scroll-based animations, Draggable for interactive elements, and SplitText for text effects.
The GreenSock ecosystem also includes a supportive community and comprehensive documentation, which facilitates integration and problem-solving for developers. The licensing model allows for free use in most non-commercial and standard commercial projects, with paid Club GreenSock memberships providing access to advanced plugins and commercial licenses for larger organizations as detailed on the GreenSock Club page.
Key features
- Timeline-based animation: Orchestrate multiple animations precisely, controlling their sequence, overlaps, and duration from a single timeline instance.
- High performance: Optimized for smooth animations at 60 frames per second (fps) by efficiently managing browser rendering and avoiding layout thrashing.
- Cross-browser compatibility: Ensures consistent animation behavior across different web browsers and devices.
- Extensive easing options: Provides a wide range of easing functions to control the rate of change in animations, from simple linear to complex bounce and elastic effects.
- Pluggable architecture: Core GSAP can be extended with official plugins like ScrollTrigger, Draggable, and SplitText for specialized animation requirements.
- Animate any property: Capable of animating CSS properties, SVG attributes, generic JavaScript object properties, and even complex data structures.
- Declarative syntax: Offers a clear and intuitive API for defining animations, making complex sequences manageable.
Pricing
GreenSock offers a free tier for most non-commercial and standard commercial projects, with paid Club GreenSock memberships providing access to advanced features and commercial licenses for agencies or large companies on their Club GreenSock pricing page. Pricing is subject to change.
| Membership Tier | Annual Cost (as of 2026-05-27) | Key Benefits |
|---|---|---|
| No Membership (Standard License) | Free | Core GSAP library, essential plugins (e.g., EasePack, CSSPlugin), free for most non-commercial and standard commercial projects. |
| Standard Club GreenSock | $75 | Access to all bonus plugins (e.g., ScrollTrigger, Draggable, SplitText), private forums, and commercial usage for individual freelance projects. |
| Shockingly Green Club GreenSock | $150 | Standard benefits plus enhanced support and licenses for small teams/agencies. |
| Business Club GreenSock | $400 | All bonus plugins, priority support, and commercial licenses for larger agencies and enterprise use. |
Common integrations
- React: GSAP integrates with React applications for component-based animations. Refer to the GSAP Hooks documentation for examples.
- Vue.js: Used within Vue components to animate elements and transitions. The GSAP documentation provides patterns for Vue integration.
- Next.js / Astro / SvelteKit: Compatible with various modern web frameworks for server-side rendered (SSR) and client-side animations.
- ScrollTrigger: Official GSAP plugin for creating scroll-driven animations, allowing elements to animate as they enter or exit the viewport. See the ScrollTrigger documentation.
- Draggable: Official GSAP plugin enabling elements to be drag-and-drop interactive. Refer to the Draggable documentation.
- HTML Canvas: Can animate properties of objects drawn on an HTML Canvas element.
- SVG: Directly animates SVG attributes and transforms for vector graphics.
Alternatives
- Framer Motion: A production-ready motion library for React, focusing on declarative animations and gestures.
- Anime.js: A lightweight JavaScript animation library for animating CSS properties, SVG, DOM attributes, and JavaScript objects.
- LottieFiles: A platform for working with Lottie animations, which are JSON-based animation files exported from Adobe After Effects via the Bodymovin plugin.
- Web Animations API (WAAPI): A native browser API for animating DOM elements, offering direct browser control over animations.
- React Transition Group: A library for managing component states and mounting/unmounting with CSS transitions, often used with CSS for animations.
Getting started
To begin using GSAP, you can install it via npm or include it directly via a CDN. The following example demonstrates a basic tween animation that rotates and moves an element.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GSAP Quick Start</title>
<style>
#box {
width: 100px;
height: 100px;
background-color: #007bff;
margin: 50px;
cursor: pointer;
}
</style>
</head>
<body>
<div id="box"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.9.1/gsap.min.js"></script>
<script>
const box = document.getElementById('box');
box.addEventListener('click', () => {
gsap.to(box, {
duration: 1,
x: 200,
rotation: 360,
backgroundColor: '#dc3545',
ease: 'power1.inOut',
overwrite: true
});
});
// Initial animation or default state
gsap.set(box, { x: 0, rotation: 0, backgroundColor: '#007bff' });
</script>
</body>
</html>
This code snippet initializes a simple blue box. When the box is clicked, GSAP animates its horizontal position (x), rotation, and background color over 1 second, using a smooth power1.inOut easing function. The overwrite: true ensures that any previous animation on the same target is stopped before the new one starts, preventing conflicts. The gsap.set() method is used to define an initial state for the element.