ask-gsap

Implements scroll-linked animations, pinning, and text morphing with GSAP ScrollTrigger and Lenis.

1|Updated Aug 17, 2026
One-click install
npx skills add https://github.com/NalinDalal/skillset --skill ask-gsap-nalindalal
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ask-gsap
Source: https://github.com/NalinDalal/skillset/tree/main/skills/ui/ask-gsap
Command: npx skills add https://github.com/NalinDalal/skillset --skill ask-gsap-nalindalal

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gsap, @studio-freight/lenis.

What problem does it solve? Building showcase-tier, scroll-driven animations requires coordinating GSAP timelines, ScrollTrigger scrubbing and pinning, and Lenis smooth scrolling, which is error-prone without proven patterns for setup, React integration, and cleanup. ## Core Features & Use Cases - ScrollTrigger Patterns: Ready-to-use code for scrub, pin, snap, horizontal scroll sections, and parallax layers. - Text and SVG Morphing: SplitText character reveals and MorphSVG path morphing tied to scroll position. - React Integration: LenisProvider setup, gsap.context() cleanup, and reduced-motion handling for Next.js apps. - Use Case: You are building a marketing landing page and need a pinned hero section with staggered text reveal, parallax background layers, and smooth scrolling that respects prefers-reduced-motion. ## Quick Start Ask the agent to add a scroll-triggered pinned section with staggered text reveal and smooth scrolling to your landing page using GSAP and Lenis.

Frequently Asked Questions about ask-gsap

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add scroll-triggered animations with GSAP ScrollTrigger?▼

Register the ScrollTrigger plugin, then attach a scrollTrigger config to any gsap tween with trigger, start, end, and scrub values. For sequenced animations, create a gsap.timeline with a shared scrollTrigger and chain tweens with position offsets.

GSAP vs motion.dev for React animations?▼

GSAP suits showcase-tier scroll-linked work like pinning, scrubbing, and text or SVG morphing. Use motion.dev for simple hover and tap states, page transitions with AnimatePresence, layout animations, and modal or toast enter and exit.

How to use Lenis smooth scroll with GSAP in React?▼

Create a LenisProvider client component that initializes Lenis in useEffect, runs its raf loop, and calls lenis.on('scroll', ScrollTrigger.update) to sync ScrollTrigger. Destroy the Lenis instance in the effect cleanup.

Why do GSAP animations leak or duplicate in React?▼

Animations leak when tweens and ScrollTriggers are not killed on unmount. Wrap all GSAP code in gsap.context() scoped to a ref and return ctx.revert() from useEffect to clean up every animation in that scope.

Does GSAP ScrollTrigger respect prefers-reduced-motion?▼

Not automatically. Check window.matchMedia('(prefers-reduced-motion: reduce)') and either set gsap.globalTimeline.timeScale(0) or disable all ScrollTriggers via ScrollTrigger.getAll().forEach(st => st.disable()).

When should I not use GSAP for animations?▼

Avoid GSAP for simple hover and tap feedback, page transitions, layout animations, and modal or toast enter and exit, where motion.dev is simpler. GSAP is justified for complex scroll-linked timelines, pinning, and morphing.