greensock/gsap-utils
Utility functions like clamp, mapRange, interpolate, snap, selector, and wrap
Open source
Description
gsap-utils is an agent skill from the GSAP project for gsap.utils, the set of math and collection helpers built into GSAP. It covers clamping, range mapping, normalization, interpolation, random values, snapping, wrapping, array conversion and function composition. The page says every utility works on its own, and that when the value argument is left out a utility returns a reusable function. Using gsap.utils keeps math and collection operations in step with GSAP's internal value handling, so there are no unit mismatches or off-by-one errors of the kind that come from writing your own clamp or lerp. Example jobs from the page are mapping scroll position to a rotation value with mapRange, snapping draggable elements to a CSS grid with snap, generating random x and y offsets for staggered particle animations, scoping element selectors to a React component container with selector(), and composing normalize, mapRange and snap into one input-handling pipeline. Install it with npx skills add https://github.com/greensock/gsap-skills --skill gsap-utils. It is published in the greensock gsap-skills repository on GitHub, and the page lists the skill as community.…
Highlights
- clamp, mapRange, normalize and interpolate
- snap and wrap for grids and loops
- Random values for staggered effects
- selector() scoped to a container
- Reusable functions when value is omitted
Ratings & Reviews
No ratings yet
Be the first to rate greensock/gsap-utils.
People also visit

gsap-utils
Pure utility functions for math, value mapping, randomization, array handling
greensock/gsap-utils FAQ
What is gsap.utils?
A collection of math and collection helpers built into GSAP, such as clamp, mapRange, snap and wrap.
How do I install it?
Run npx skills add https://github.com/greensock/gsap-skills --skill gsap-utils.
Can I use them without an animation?
Yes. The page says the utilities work standalone, and return reusable functions when the value argument is omitted.
Why not write my own clamp?
The page says gsap.utils stays in sync with GSAP's value handling, avoiding unit mismatches and off-by-one errors.
Who publishes it?
The GSAP project, in its gsap-skills repository on GitHub. The page lists the skill as community.
What are the best greensock/gsap-utils alternatives?
Popular alternatives to greensock/gsap-utils include gsap-utils, gsap-utils and gsap-core. See all greensock/gsap-utils alternatives





