GreenSock's official skill for GSAP plugins: registration, Flip, Draggable, SplitText, ScrollSmoother, DrawSVG, MorphSVG, MotionPath, CustomEase, physics and GSDevTools, all free.
GSAP Utils Skill
GreenSock's official skill for gsap.utils: clamp, mapRange, normalize, interpolate, random, snap, distribute, toArray, wrap and pipe, including the reusable function form most helpers support.
Install
Other ways to install
About
- Documents every gsap.utils helper with examples
- Explains the reusable function form and the random() exception
- clamp, mapRange, normalize and interpolate for value mapping
- random, snap, shuffle and distribute for randomness and grids
- getUnit, unitize and splitColor for parsing
- selector, toArray, pipe, wrap and wrapYoyo for collections
gsap-utils is part of greensock/gsap-skills, GreenSock's official skills for GSAP. It documents gsap.utils, the set of pure helper functions that ship with GSAP and need no registration, used in function-based tween values, ScrollTrigger and Observer callbacks, or any JavaScript that drives an animation.
The function form. The skill's key point is a pattern agents often miss: many utils take the value to transform as their last argument, and omitting it returns a reusable function with the configuration baked in, which is what you want inside a mousemove handler or a tween callback. It flags the exception: random() returns a function only when you pass true as the last argument.
Helpers covered:
- Clamping and ranges:
clamp,mapRange,normalize,interpolate - Random and snap:
random(ranges, arrays, snap increments),snap,shuffle,distributefor staggered values across a set - Units and parsing:
getUnit,unitize,splitColor - Arrays and collections:
selector,toArray,pipe,wrap,wrapYoyo
Each comes with a short code example, and the skill ends with best practices and things not to do. Typical uses are mapping scroll progress to a value, randomising or snapping positions to a grid, and normalising pointer input. Pairs with gsap-core, gsap-timeline and gsap-scrolltrigger. MIT licensed.
Try it
Once installed, ask your agent something like:
Make the hero image follow the pointer, clamping its movement to 40px either way and mapping the pointer's x position to a slight rotation.
SKILL.md
The instructions your agent loads, as published by GreenSock.
Related Skills
See all GSAP Utils alternativesGreenSock's official skill for smooth GSAP animation: animate transforms and opacity, avoid layout thrashing, use stagger and quickTo(), and keep ScrollTrigger work cheap.
GreenSock's official skill for GSAP timelines: gsap.timeline(), the position parameter, labels, defaults, nesting and playback control, plus the best practices and mistakes to avoid when sequencing animations.
Skill: GSAP Core
by GreenSock
GreenSock's official skill for the GSAP core engine — tweens, eases, staggers, defaults and responsive/reduced-motion animation via matchMedia.