gsap-performance

Optimize GSAP animations with transforms, opacity, and ScrollTrigger refresh debouncing.

Updated Apr 13, 2026
One-click install
npx skills add https://github.com/DanielV-94/rg-medium --skill gsap-performance-danielv-94
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gsap-performance
Source: https://github.com/DanielV-94/rg-medium/tree/main/.agents/skills/gsap-performance
Command: npx skills add https://github.com/DanielV-94/rg-medium --skill gsap-performance-danielv-94

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Helps developers and designers reduce animation jank and frame drops by providing practical GSAP-focused techniques to keep work on the compositor, minimize layout and paint overhead, and maintain consistent 60fps animations across devices.

Core Features & Use Cases

  • Prefer transforms and opacity: Guide to animate x/y, scale, rotation, and opacity instead of width/height/top/left to avoid layout thrash.
  • Layer promotion and will-change: Advice on selective use of will-change and avoiding blanket promotions that waste memory.
  • Batching and frequent updates: Recommendations to batch reads/writes, use gsap.quickTo for high-frequency properties, use stagger for lists, debounce ScrollTrigger.refresh, and clean up off-screen animations.
  • Use Case: Optimize a homepage with many entrance animations, a pinned ScrollTrigger section, and a mouse-following element to reduce dropped frames on mobile.

Quick Start

Optimize my page's GSAP animations by switching movement to transforms and opacity, adding will-change only to animating elements, batching DOM reads/writes, using gsap.quickTo for frequent updates, and debouncing ScrollTrigger.refresh.

Frequently Asked Questions about gsap-performance

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

FAQPage Schema
How do I fix GSAP animation jank and maintain 60fps on scroll?

Fix GSAP animation jank by animating only transforms and opacity to avoid layout thrash, batching DOM reads and writes, and debouncing ScrollTrigger.refresh to maintain a smooth 60fps frame rate.

Why does animating width and height cause frame drops in GSAP?

Animating width and height causes frame drops because it triggers layout recalculation and paint work in the browser. Animate x, y, scale, rotation, and opacity instead to keep work on the compositor.

Should I use will-change on all animated elements to improve performance?

Avoid applying will-change to all animated elements. Blanket layer promotions waste memory; instead, apply will-change selectively only to elements currently animating to reduce layout and paint overhead.

What is the best way to optimize high-frequency GSAP updates like mouse followers?

Optimize high-frequency GSAP updates by using gsap.quickTo for frequent property changes. This prevents layout thrash by avoiding the overhead of creating new tween instances on every event.

How do I optimize pinned ScrollTrigger sections and staggered lists for mobile?

Optimize pinned ScrollTrigger sections and staggered lists on mobile by using stagger for list animations, debouncing ScrollTrigger.refresh, and cleaning up off-screen animations to minimize memory and paint work.