GreenSock's GSAP JavaScript animation library (including Draggable).
GreenSock 2.0.2
- NEW: Draggable has a new onPressInit callback that fires before the starting values are recorded in the onPress, allowing you to make changes before any dragging occurs. onPressInit always fires BEFORE onPress.

- NEW: transforms (like "x", "y", "scaleX", etc.) with "vw" or "vh" units are now converted in CSSPlugin to their px-based equivalents (previously vw/vh were ignored).

- NEW: DrawSVGPlugin recognizes a new "live" keyword that'll cause it to constantly re-evaluate the length of the line during the tween so that, for example, if the window gets resized and the element changes size accordingly, it'll be instantly updated. For example: drawSVG:"40% 60% live". You just put "live" at the end of the string to trigger this behavior.

- IMPROVED: Draggable handles ShadowDom content better now (no error, for example, if you set bounds:window).

- IMPROVED: the ES Modules accommodate decaration of a GreenSockGlobals object (previously that only worked in the ES5 files), so you can have the globals added to that object instead of the window/global.

- IMPROVED: DrawSVGPlugin now works around a problem in Firefox that causes <line> elements not to report their size correctly when in a mask in <defs>.

- FIXED: changed "const" to "var" in ES module files for better compatibility with older browsers (like IE and Safari).

- FIXED: When SplitText finds only one child element, it no longer splits INSIDE of that by default - it always splits the outside when possible (so things are consistent regardless of how many children the element has).

- FIXED: jquery.gsap.js eliminates the version check (for stale versions of GSAP) because it was failing with versions greater than 2.0.0 and it just didn't seem necessary anymore since GSAP has been out for so long and it's extremely uncommon for there to be such a stale version in circulation that wouldn't work with that plugin.

- FIXED: if you use an onComplete to restart() a tween/timeline that's nested inside another timeline that has autoRemoveChildren:true, it could result in an endless loop (maximum call stack size exceeded). For example, var masterTL = new TimelineMax({autoRemoveChildren: true}), tl = new TimelineMax(); tl.eventCallback("onComplete", function() { tl.restart() } );tl.fromTo('div', 1.1, { rotation: 0 }, { rotation: 360 });masterTL.add(tl);

- FIXED: if you create a tween that doesn't actually tween anything (like if obj.x is 1 and you try tweening it to 1) and then create a concurrent tween of that same object, the default ("auto") overwrite mode will kill that first tween (thinking it's useless). Normally that's fine, but if you've got a callback like an onComplete, it wouldn't fire. That's resolved now. #278

- FIXED: in very rare situations, using "rotationZ" instead of "rotation" could cause the value not to take effect (when the starting and ending values are identical) (CSSPlugin). See

- FIXED: if you define a Draggable's minDuration greater than 2, but you don't define a maxDuration, it'll act as if minDuration and maxDuration are both 2. Now if you define only a minDuration, it'll use that as the maxDuration as well.
Latest commit 53f4a8d Aug 26, 2018
Failed to load latest commit information.
src 2.0.2 Aug 26, 2018
.gitignore Initial full commit Sep 22, 2012 2.0.2 Aug 26, 2018
bower.json 2.0.2 Aug 26, 2018
package.json 2.0.2 Aug 26, 2018

GSAP (GreenSock Animation Platform)

Ultra high-performance, professional-grade animation for the modern web

GSAP is a JavaScript library for creating high-performance animations that work in every major browser. No other library delivers such advanced sequencing, reliability, API efficiency, and tight control while solving real-world problems on over 4 million sites. GSAP works around countless browser inconsistencies; your animations 'just work'. CSS properties, SVG, canvas libraries, custom properties of generic objects, colors, strings...animate anything! At its core, GSAP is a high-speed property manipulator, updating values over time with extreme accuracy. It's up to 20x faster than jQuery! See the "Why GSAP?" article for what makes GSAP so special.

Full documentation

What is GSAP? (video)

What is GSAP?

Getting started video

Getting started video

Unlike monolithic frameworks that dictate how you structure your apps, GSAP is completely flexible; sprinkle it wherever you want. React, Vue, Angular or vanilla JS - doesn't matter. Simply put, GSAP is the most robust high-performance animation library on the planet, which is probably why every major ad network excludes it from file size calculations.

Zero dependencies.

This is the public repository for GreenSock's JavaScript tools like GSAP and Draggable. "GSAP" describes all of the animation-related tools which include TweenLite, TweenMax, TimelineLite, TimelineMax, various plugins, extra easing functions, etc.


TweenMax is most popular because it has all the essential tools plus several common plugins, all in one file:

<script src=""></script>

Click the green "Download GSAP" button at for more options. Click "customize" at the bottom of the resulting window to see all the extra plugins and tool URLs.

Draggable, for example, is at:

<script src=""></script>

Most ad networks have GSAP on their CDNs as well, so contact them for the appropriate URL(s).


See the full guide to using GSAP via NPM.

npm install gsap

The default (main) file is TweenMax which includes TweenLite, TimelineLite, TimelineMax, all of the eases (except CustomEase/CustomWiggle/CustomBounce) and the following plugins: css, roundProps, bezier, attr, and directionalRotation.

//typical import
import {TweenMax, Power2, TimelineLite} from "gsap/TweenMax";

//or get to the parts that aren't included inside TweenMax:
import Draggable from "gsap/Draggable";
import ScrollToPlugin from "gsap/ScrollToPlugin";

//or, as of 2.0.0, all tools are exported from the "all" file (excluding bonus plugins):
import {TweenMax, CSSPlugin, ScrollToPlugin, Draggable, Elastic} from "gsap/all";
//if tree shaking dumps plugins, just reference them somewhere in your code like:
const plugins = [CSSPlugin, ScrollToPlugin]; 

As of version 2.0.0, the NPM files are ES modules, though there's also a /umd/ directory with UMD files for extra compatibility.

For Club GreenSock-only plugins, download them from your account and then treat them as part of your own JS payload or drop them into your node_modules/gsap folder. Post other questions in our forums and we'd be happy to help.


Get CustomEase for free

Sign up for a free GreenSock account to gain access to CustomEase which lets you create literally any ease imaginable (unlimited control points). It's in the download zip at (when you're logged in).

What is Club GreenSock? (video)

What is Club GreenSock?

Sign up anytime.

Advanced playback controls & debugging


GSDevTools adds a visual UI for controlling your GSAP animations which can significantly boost your workflow and productivity. (Club GreenSock membership required, not included in this repository).

Try all bonus plugins for free on Codepen

Need help?

GreenSock forums are an excellent resource for learning and getting your questions answered. Report any bugs there too please (it's also okay to file an issue on Github if you prefer).


GreenSock's standard "no charge" license can be viewed at Club GreenSock members are granted additional rights. See for details. Why doesn't GreenSock use an MIT (or similar) open source license, and why is that a good thing? This article explains it all:

Copyright (c) 2008-2018, GreenSock. All rights reserved.