GSAP

Knowledge base from the GSAP (GreenSock Animation Platform) documentation — core API (gsap.to/from/timeline), Tween/Timeline instance methods, utility methods, easing, and every official plugin (ScrollTrigger, Draggable, Flip, SplitText, MotionPathPlugin, Observer, ScrollSmoother, Inertia, MorphSVG, DrawSVG, and more). Use when building JS/CSS animations with GSAP, choosing between plugins for an effect, looking up a method/property signature, or debugging timeline sequencing, scroll-linked, or drag interactions.

411 capítulos

GSAP

Package: gsap | Sections: GSAP Core, Timeline, Tween, Utils, Eases, Helper Functions, Plugins, Guides | Chapters: 411 | Generated: 2026-08-25

How to Use This Skill

  • Without arguments — load core patterns for reference
  • With a topic — ask about ScrollTrigger, stagger, Draggable, or another indexed topic; I find and read the relevant chapter
  • With a method/plugin name — ask for gsap.to(), Flip.from(), ch331; I load that specific chapter
  • Browse — ask "what chapters do you have?" to see the full index

When you ask about something not covered in Core Patterns below, I will read the relevant chapter file before answering.


Core Patterns & Conventions

Everything is a tween or a timeline. gsap.to(target, {vars}) animates target's properties toward the values in vars from their current state; gsap.from()/gsap.fromTo() control the starting state explicitly; gsap.set() applies values instantly with no animation. A gsap.timeline() is a container that sequences and nests tweens under one controllable playhead — reach for one the moment two or more animations need relative timing.

Targets are flexible. A CSS selector string, a single element, an array/NodeList, or a plain object (for tweening arbitrary JS values) are all valid targets — GSAP resolves selectors via document.querySelectorAll by default, or a scoped selector function from gsap.utils.selector()/gsap.context().

Sequencing uses labels and the position parameter, not hardcoded times. Inside a timeline, the second argument to .to()/.from()/.set() ("+=0.5", "<", "myLabel") places the tween relative to the previous tween or a named label — this keeps sequences resilient when an earlier tween's duration changes. "<" = start of previous tween, ">" = end of previous tween (default).

Plugins must be registered before use. gsap.registerPlugin(ScrollTrigger, Draggable, ...) once per session (per plugin) — using plugin-specific properties without registering silently does nothing. Most plugins ship as separate imports from the gsap/ package (e.g. import { ScrollTrigger } from "gsap/ScrollTrigger"); GSAP core plugins (CSS, Attributes, Snap, Modifiers, EndArray) are bundled and don't need separate registration.

Cleanup in component frameworks uses gsap.context(). Scope all tween/ScrollTrigger creation inside a context tied to a DOM ref, and call context.revert() on unmount — this is the standard, and near-mandatory, pattern in React/Vue/Svelte to avoid leaked tweens and duplicate ScrollTriggers across remounts.

Responsiveness uses gsap.matchMedia(), not manual window.matchMedia + resize listeners — each breakpoint block gets its own setup and automatic cleanup when the breakpoint no longer matches.

Multi-target choreography uses stagger, not manual delay loops — stagger accepts a number (seconds between each target) or an object ({each, from, grid, ease}) for direction- and grid-aware cascades.

ScrollTrigger has two distinct modes: toggleActions (play/pause/resume/reverse on enter/leave the trigger zone) for animations that play once, and scrub (playhead tied directly to scroll position) for parallax/progress-driven motion — these are not interchangeable, pick based on whether the animation should play or track.

Prefer transform properties. x/y/scale/rotation (GPU-accelerated, no layout) over left/top/width/height wherever the visual result is equivalent.


Chapter Index

intro

#Title
ch001GSAP Overview (Animate Anything)

GSAP Core

#Title
ch002The gsap Object
ch003Attributes (Core Plugin)
ch004CSS (Core Plugin)
ch005EndArray (Core Plugin)
ch006Modifiers (Core Plugin)
ch007Snap (Core Plugin)
ch008gsap.config()
ch009gsap.context()
ch010gsap.defaults()
ch011gsap.delayedCall()
ch012gsap.effects
ch013gsap.exportRoot()
ch014gsap.from()
ch015gsap.fromTo()
ch016gsap.getById()
ch017gsap.getProperty()
ch018gsap.getTweensOf()
ch019gsap.globalTimeline
ch020gsap.isTweening()
ch021gsap.killTweensOf()
ch022gsap.matchMedia()
ch023gsap.matchMediaRefresh()
ch024gsap.parseEase()
ch025gsap.quickSetter()
ch026gsap.quickTo()
ch027gsap.registerEase()
ch028gsap.registerEffect()
ch029gsap.registerPlugin()
ch030gsap.set()
ch031gsap.ticker
ch032gsap.timeline()
ch033gsap.to()
ch034gsap.updateRoot()
ch035gsap.utils
ch036gsap.version

Timeline

#Title
ch037Timeline (Overview)
ch038Timeline.add()
ch039Timeline.addLabel()
ch040Timeline.addPause()
ch041Timeline.autoRemoveChildren
ch042Timeline.call()
ch043Timeline.clear()
ch044Timeline.currentLabel()
ch045Timeline.data
ch046Timeline.delay()
ch047Timeline.duration()
ch048Timeline.endTime()
ch049Timeline.eventCallback()
ch050Timeline.from()
ch051Timeline.fromTo()
ch052Timeline.getById()
ch053Timeline.getChildren()
ch054Timeline.getTweensOf()
ch055Timeline.globalTime()
ch056Timeline.invalidate()
ch057Timeline.isActive()
ch058Timeline.iteration()
ch059Timeline.kill()
ch060Timeline.killTweensOf()
ch061Timeline.labels
ch062Timeline.nextLabel()
ch063Timeline.parent
ch064Timeline.pause()
ch065Timeline.paused()
ch066Timeline.play()
ch067Timeline.previousLabel()
ch068Timeline.progress()
ch069Timeline.recent()
ch070Timeline.remove()
ch071Timeline.removeLabel()
ch072Timeline.removePause()
ch073Timeline.repeat()
ch074Timeline.repeatDelay()
ch075Timeline.restart()
ch076Timeline.resume()
ch077Timeline.reverse()
ch078Timeline.reversed()
ch079Timeline.revert()
ch080Timeline.scrollTrigger
ch081Timeline.seek()
ch082Timeline.set()
ch083Timeline.shiftChildren()
ch084Timeline.smoothChildTiming
ch085Timeline.startTime()
ch086Timeline.then()
ch087Timeline.time()
ch088Timeline.timeScale()
ch089Timeline.to()
ch090Timeline.totalDuration()
ch091Timeline.totalProgress()
ch092Timeline.totalTime()
ch093Timeline.tweenFromTo()
ch094Timeline.tweenTo()
ch095Timeline.vars
ch096Timeline.yoyo()

Tween

#Title
ch097Tween (Overview)
ch098Tween.data
ch099Tween.delay()
ch100Tween.duration()
ch101Tween.endTime()
ch102Tween.eventCallback()
ch103Tween.globalTime()
ch104Tween.invalidate()
ch105Tween.isActive()
ch106Tween.iteration()
ch107Tween.kill()
ch108Tween.pause()
ch109Tween.paused()
ch110Tween.play()
ch111Tween.progress()
ch112Tween.ratio
ch113Tween.repeat()
ch114Tween.repeatDelay()
ch115Tween.restart()
ch116Tween.resume()
ch117Tween.reverse()
ch118Tween.reversed()
ch119Tween.revert()
ch120Tween.scrollTrigger
ch121Tween.seek()
ch122Tween.startTime()
ch123Tween.targets()
ch124Tween.then()
ch125Tween.time()
ch126Tween.timeScale()
ch127Tween.totalDuration()
ch128Tween.totalProgress()
ch129Tween.totalTime()
ch130Tween.vars
ch131Tween.yoyo()

Utils

#Title
ch132Utility Methods (Overview)
ch133gsap.utils.checkPrefix()
ch134gsap.utils.clamp()
ch135gsap.utils.distribute()
ch136gsap.utils.getUnit()
ch137gsap.utils.interpolate()
ch138gsap.utils.mapRange()
ch139gsap.utils.normalize()
ch140gsap.utils.pipe()
ch141gsap.utils.random()
ch142gsap.utils.selector()
ch143gsap.utils.shuffle()
ch144gsap.utils.snap()
ch145gsap.utils.splitColor()
ch146gsap.utils.toArray()
ch147gsap.utils.unitize()
ch148gsap.utils.wrap()
ch149gsap.utils.wrapYoyo()

Eases

#Title
ch150Easing (Overview)
ch151CustomBounce
ch152CustomEase
ch153CustomWiggle
ch154ExpoScaleEase
ch155RoughEase
ch156SlowMo
ch157SteppedEase

Helper Functions

#Title
ch158Helper Functions (Overview)
ch159Weighted Eases (Helper)
ch160Align transformOrigin of Two Elements (Helper)
ch161Anchor Points to Progress Values (Helper)
ch162Animating backgroundSize "cover"/"contain" (Helper)
ch163Blend Two Eases (Helper)
ch164Debounced Resize Callback (Helper)
ch165"Compensated" Skews (Helper)
ch166Find the Linear Progress Where an Ease Hits a Value (Helper)
ch167Simple FLIP (Helper)
ch168Format Number With Commas (Helper)
ch169Directional Snapping (Helper)
ch170Find a Nested Label's Time (Helper)
ch171Scroll Position Lookup for an Element (Helper)
ch172Scroll Position of a ScrollTriggered Animation (Helper)
ch173Scrub Through a Canvas Image Sequence (Helper)
ch174Kill All Tweens of Child Elements (Helper)
ch175Hook a Lottie Animation to ScrollTrigger (Helper)
ch176Split Lines Inside Nested Elements (Helper)
ch177Pluck Random Values Without Repeats (Helper)
ch178Progressively Build a Timeline Step-by-Step (Helper)
ch179Seamless Horizontal Loop (Helper)
ch180Change transformOrigin Without a Jump (Helper)
ch181Split Arabic Text Respecting Letter Shape (Helper)
ch182SplitTextAnimator — Responsive SplitText Inside a Timeline (Helper)
ch183Stop Overscroll Behavior, Including iOS Safari (Helper)
ch184Force GSAP to Update in a Hidden Tab (Helper)
ch185Track Playhead Direction of Any Animation (Helper)
ch186Weighted Random Pick From an Array (Helper)

Plugins overview

#Title
ch187Plugins Overview

Plugin — CSSRulePlugin

#Title
ch188CSSRulePlugin (deprecated)
ch189CSSRulePlugin.getRule() (deprecated)

Plugin — Draggable

#Title
ch190Draggable (Overview)
ch191Draggable.addEventListener()
ch192Draggable.applyBounds()
ch193Draggable.autoScroll
ch194Draggable.deltaX
ch195Draggable.deltaY
ch196Draggable.disable()
ch197Draggable.enable()
ch198Draggable.enabled()
ch199Draggable.endDrag()
ch200Draggable.endRotation
ch201Draggable.endX
ch202Draggable.endY
ch203Draggable.getDirection()
ch204Draggable.isPressed
ch205Draggable.isThrowing
ch206Draggable.kill()
ch207Draggable.lockAxis
ch208Draggable.lockedAxis
ch209Draggable.maxRotation
ch210Draggable.maxX
ch211Draggable.maxY
ch212Draggable.minRotation
ch213Draggable.minX
ch214Draggable.minY
ch215Draggable.pointerEvent
ch216Draggable.pointerX
ch217Draggable.pointerY
ch218Draggable.rotation
ch219Draggable.startDrag()
ch220Draggable.startX
ch221Draggable.startY
ch222Draggable.create()
ch223Draggable.get()
ch224Draggable.hitTest()
ch225Draggable.timeSinceDrag()
ch226Draggable.target
ch227Draggable.tween
ch228Draggable.update()
ch229Draggable.vars
ch230Draggable.x
ch231Draggable.y
ch232Draggable.zIndex

Plugin — DrawSVG

#Title
ch233DrawSVGPlugin (Overview)
ch234DrawSVGPlugin.getLength()
ch235DrawSVGPlugin.getPosition()

Plugin — EaselPlugin

#Title
ch236EaselPlugin

Plugin — Flip

#Title
ch237Flip (Overview)
ch238Flip.batch()
ch239Flip.fit()
ch240Flip.from()
ch241Flip.getState()
ch242Flip.isFlipping()
ch243Flip.killFlipsOf()
ch244Flip.makeAbsolute()
ch245Flip.to()

Plugin — GSDevTools

#Title
ch246GSDevTools (Overview)
ch247GSDevTools.create()

Plugin — Inertia

#Title
ch248InertiaPlugin (Overview)
ch249InertiaPlugin.getVelocity()
ch250InertiaPlugin.isTracking()
ch251InertiaPlugin.track()
ch252InertiaPlugin.untrack()
ch253VelocityTracker (Overview)
ch254VelocityTracker.addProp()
ch255VelocityTracker.get()
ch256VelocityTracker.getByTarget()
ch257VelocityTracker.isTracking()
ch258VelocityTracker.isTrackingProp()
ch259VelocityTracker.removeProp()
ch260VelocityTracker.target
ch261VelocityTracker.track() (static)
ch262VelocityTracker.untrack() (static)

Plugin — MorphSVG

#Title
ch263MorphSVGPlugin (Overview)
ch264MorphSVGPlugin.convertToPath()
ch265MorphSVGPlugin.defaultRender
ch266MorphSVGPlugin.defaultType
ch267MorphSVGPlugin.defaultUpdateTarget
ch268MorphSVGPlugin.rawPathToString()
ch269MorphSVGPlugin.stringToRawPath()

Plugin — MotionPathPlugin

#Title
ch270MotionPathPlugin (Overview)
ch271MotionPathPlugin.pointsToSegment()
ch272MotionPathPlugin.arrayToRawPath()
ch273MotionPathPlugin.convertCoordinates()
ch274MotionPathPlugin.convertToPath()
ch275MotionPathPlugin.getAlignMatrix()
ch276MotionPathPlugin.getGlobalMatrix()
ch277MotionPathPlugin.getLength()
ch278MotionPathPlugin.getPositionOnPath()
ch279MotionPathPlugin.getRawPath()
ch280MotionPathPlugin.getRelativePosition()
ch281MotionPathPlugin.rawPathToString()
ch282MotionPathPlugin.sliceRawPath()
ch283MotionPathPlugin.stringToRawPath()

Plugin — MotionPathHelper

#Title
ch284MotionPathHelper.kill()
ch285MotionPathHelper.editPath()

Plugin — Observer

#Title
ch286Observer (Overview)
ch287Observer.deltaX
ch288Observer.deltaY
ch289Observer.disable()
ch290Observer.enable()
ch291Observer.event
ch292Observer.isDragging
ch293Observer.isEnabled
ch294Observer.isPressed
ch295Observer.kill()
ch296Observer.startX
ch297Observer.startY
ch298Observer.create()
ch299Observer.getAll()
ch300Observer.getById()
ch301Observer.isTouch
ch302Observer.target
ch303Observer.vars
ch304Observer.velocityX
ch305Observer.velocityY
ch306Observer.x
ch307Observer.y

Plugin — Physics2D

#Title
ch308Physics2DPlugin

Plugin — PhysicsPropsPlugin

#Title
ch309PhysicsPropsPlugin

Plugin — Pixi

#Title
ch310PixiPlugin
ch311PixiPlugin.registerPIXI()

Plugin — ScrambleText

#Title
ch312ScrambleTextPlugin

Plugin — ScrollSmoother

#Title
ch313ScrollSmoother (Overview)
ch314ScrollSmoother.content
ch315ScrollSmoother.effects
ch316ScrollSmoother.getVelocity()
ch317ScrollSmoother.kill()
ch318ScrollSmoother.offset()
ch319ScrollSmoother.paused()
ch320ScrollSmoother.progress
ch321ScrollSmoother.scrollTo()
ch322ScrollSmoother.scrollTop()
ch323ScrollSmoother.scrollTrigger
ch324ScrollSmoother.smooth()
ch325ScrollSmoother.create()
ch326ScrollSmoother.get()
ch327ScrollSmoother.vars
ch328ScrollSmoother.wrapper

Plugin — ScrollTo

#Title
ch329ScrollToPlugin
ch330ScrollToPlugin.config

Plugin — ScrollTrigger

#Title
ch331ScrollTrigger (Overview)
ch332ScrollTrigger.animation
ch333ScrollTrigger.direction
ch334ScrollTrigger.disable()
ch335ScrollTrigger.enable()
ch336ScrollTrigger.end
ch337ScrollTrigger.getTween()
ch338ScrollTrigger.getVelocity()
ch339ScrollTrigger.isActive
ch340ScrollTrigger.kill()
ch341ScrollTrigger.labelToScroll()
ch342ScrollTrigger.next()
ch343ScrollTrigger.pin
ch344ScrollTrigger.previous()
ch345ScrollTrigger.progress
ch346ScrollTrigger.refresh()
ch347ScrollTrigger.scroll()
ch348ScrollTrigger.scroller
ch349ScrollTrigger.start
ch350ScrollTrigger.addEventListener()
ch351ScrollTrigger.batch()
ch352ScrollTrigger.clearMatchMedia()
ch353ScrollTrigger.clearScrollMemory()
ch354ScrollTrigger.config()
ch355ScrollTrigger.create()
ch356ScrollTrigger.defaults()
ch357ScrollTrigger.getAll()
ch358ScrollTrigger.getById()
ch359ScrollTrigger.isInViewport()
ch360ScrollTrigger.isScrolling()
ch361ScrollTrigger.isTouch
ch362ScrollTrigger.killAll()
ch363ScrollTrigger.matchMedia()
ch364ScrollTrigger.maxScroll()
ch365ScrollTrigger.normalizeScroll()
ch366ScrollTrigger.observe()
ch367ScrollTrigger.positionInViewport()
ch368ScrollTrigger.refresh() (static)
ch369ScrollTrigger.removeEventListener()
ch370ScrollTrigger.saveStyles()
ch371ScrollTrigger.scrollerProxy()
ch372ScrollTrigger.snapDirectional()
ch373ScrollTrigger.sort()
ch374ScrollTrigger.update()
ch375ScrollTrigger.trigger
ch376ScrollTrigger.vars

Plugin — SplitText

#Title
ch377SplitText (Overview)
ch378SplitText.chars
ch379SplitText.isSplit
ch380SplitText.kill()
ch381SplitText.lines
ch382SplitText.masks
ch383SplitText.revert()
ch384SplitText.split()
ch385SplitText.create()
ch386SplitText.vars
ch387SplitText.words

Plugin — TextPlugin

#Title
ch388TextPlugin

Guides

#Title
ch389Updating to GSAP 3
ch390Accessible Animation
ch391Handling Conflicting Tweens
ch392Avoiding FOUC
ch393JS Frameworks
ch394Getting Started
ch395Control and Callbacks
ch396Easing (Guide)
ch397Staggers (Guide)
ch398Timelines (Guide)
ch399immediateRender
ch400Keyframes
ch401Common GSAP Mistakes
ch402Plugins (Guide)
ch403The Position Parameter
ch404Moving Off the Private Repo
ch405React
ch406React — Advanced Techniques
ch407React — Useful Patterns
ch408ScrollTrigger Tips & Mistakes
ch409SVG
ch410Webflow
ch411WordPress

Topic Index

  • Accessibility → ch390
  • CustomEase / custom easing → ch152, ch396
  • Draggable → ch190–ch232
  • Easing → ch150, ch396, ch024, ch027
  • Flip (layout animation) → ch237–ch245, ch167
  • Framework cleanup (React/Vue/Svelte) → ch009 (gsap.context), ch393, ch405–ch407
  • Inertia / physics → ch248–ch262, ch308, ch309
  • Keyframes → ch400
  • Labels → ch039, ch061, ch403
  • matchMedia / responsive → ch022, ch023
  • Migration from GSAP 2 → ch389
  • MorphSVG → ch263–ch269
  • MotionPathPlugin → ch270–ch285
  • Observer → ch286–ch307
  • Performance (quickTo/quickSetter) → ch025, ch026
  • Pin (ScrollTrigger) → ch343
  • Position parameter → ch403
  • Scrub vs toggleActions → ch331, ch343, ch396–ch398
  • ScrollSmoother → ch313–ch328
  • ScrollTrigger → ch331–ch376, ch408
  • SplitText → ch377–ch387
  • Stagger → ch397, ch135
  • Timeline sequencing → ch037–ch096, ch398
  • Utility methods (clamp, mapRange, wrap, snap...) → ch132–ch149
  • Webflow / WordPress integration → ch410, ch411

Supporting Files


Scope & Limits

This skill covers the official GSAP v3 documentation (core API, Tween/Timeline instances, utility methods, easing, and every officially maintained plugin) as of the fetch date. GSAP became 100% free (MIT) in 2024 — no license-gated features remain, though CSSRulePlugin is marked deprecated by GreenSock in favor of native CSS custom properties. For implementation details specific to a codebase, combine with project-specific tools.