Setup & Installation
What This Skill Does
gsap.utils is a collection of math and collection helpers built into GSAP. It covers clamping, range mapping, normalization, interpolation, random values, snapping, wrapping, array conversion, and function composition. All utilities work standalone or return reusable functions when the value argument is omitted.
Using gsap.utils keeps math and collection operations in sync with GSAP's internal value handling, so there are no unit mismatches or off-by-one errors that come from rolling your own clamp or lerp functions.
When to use it
- Mapping scroll position to a rotation value with mapRange
- Snapping draggable elements to a CSS grid using snap
- Generating random x/y offsets for staggered particle animations
- Scoping element selectors to a React component container with selector()
- Composing normalize, mapRange, and snap into a single pipeline for input handling
Similar Skills
ios-application-dev
A reference guide for building iOS apps with UIKit, SnapKit, and SwiftUI.
fullstack-dev
A workflow guide for building full-stack applications, covering backend architecture, frontend-backend integration, auth, real-time features, and production hardening.
android-native-dev
A reference guide for Android native development covering Kotlin/Compose patterns, Material Design 3 specs, Gradle project setup, and build troubleshooting.
frontend-dev
Builds complete frontend pages by combining UI design, scroll animations, AI-generated media assets, and copywriting into a single workflow.
