Capítulo 187 de 411

Chapter 187: Plugins Overview

Core Idea

GSAP ships a small core (Tween, Timeline, and the CSS/Attributes/array-value animation built into core) and moves everything else — Draggable, ScrollTrigger, SplitText, MorphSVG, Flip, and dozens of others — into optional plugins you register only when needed, keeping bundle size down.

Key Concepts

  • Core plugins: CSS, Attributes, EndArray (array values), Modifiers, Snap — these ship inside GSAP core, no registration needed.
  • Optional plugins: everything else (Draggable, ScrollTrigger, MotionPathPlugin, Inertia, Flip, MorphSVG, SplitText, ScrollSmoother, Observer, GSDevTools, ScrollTo, TextPlugin, ScrambleText, EaselPlugin, Pixi, Physics2D/PhysicsPropsPlugin, CSSRulePlugin, DrawSVG) must be imported and passed to gsap.registerPlugin().
  • Since 2024, GSAP (including what used to be "Club GreenSock" paid plugins) is 100% free/MIT-licensed.

Key Takeaways

  1. Always call gsap.registerPlugin(...) for any non-core plugin, including in production builds, to avoid tree-shaking silently dropping it.
  2. Pick plugins by the problem you're solving (dragging → Draggable, scroll-linked animation → ScrollTrigger/ScrollSmoother, text splitting → SplitText, SVG path morphing → MorphSVG).

Connects To

  • gsap.registerPlugin(): the required registration call for every plugin covered in this section.