gsap-performance

Optimizes GSAP animations for smooth 60fps rendering using transforms, batching, and will-change.

Updated May 4, 2026
One-click install
npx skills add https://github.com/Gito125/gideon_portfolio --skill gsap-performance-gito125
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gsap-performance
Source: https://github.com/Gito125/gideon_portfolio/tree/main/.github/skills/gsap-performance
Command: npx skills add https://github.com/Gito125/gideon_portfolio --skill gsap-performance-gito125

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? GSAP animations can cause jank, dropped frames, and layout thrashing when they animate layout-heavy properties or create too many simultaneous tweens. This Skill provides concrete rules and patterns to keep animations on the compositor thread and running at 60fps. ## Core Features & Use Cases - Compositor-Friendly Properties: Enforces animating transform and opacity instead of width, height, top, left, margin, or padding to avoid layout and paint cost. - Efficient Update Patterns: Recommends gsap.quickTo() for frequently updated properties like mouse followers, and stagger instead of many manual tweens for lists. - ScrollTrigger Tuning: Covers pin promotion, scrub values, and debounced ScrollTrigger.refresh() calls to reduce scroll-related work. - Use Case: A developer notices a scroll-pinned hero section stutters on low-end devices. Apply this Skill to replace left/top animations with x/y, add will-change only to animating elements, and debounce ScrollTrigger.refresh() calls. ## Quick Start Review my GSAP animation code and optimize it for 60fps performance using transform-based properties and efficient tween patterns.

Frequently Asked Questions about gsap-performance

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

FAQPage Schema
How do I make GSAP animations run at 60fps?▼

Animate only transform properties (x, y, scale, rotation) and opacity, which stay on the compositor and avoid layout and paint. Add will-change: transform in CSS to elements that animate, and avoid animating width, height, top, or left.

How to optimize GSAP mouse follower animations?▼

Use gsap.quickTo() for properties updated on every mousemove event, such as x and y. It reuses a single tween instead of creating a new tween per event, which significantly reduces overhead for frequently updated properties.

Why does my GSAP animation cause layout thrashing?▼

Layout thrashing happens when you interleave DOM reads and writes, or animate layout properties like width, height, top, left, margin, or padding. Batch all reads first, then writes, and switch to transform-based x and y for movement.

When should I call ScrollTrigger.refresh()?▼

Call ScrollTrigger.refresh() only when the layout actually changes, such as after content loads, not on every resize. Debounce the call when possible to avoid repeated recalculation work during scroll.

Should I set will-change on every animated element?▼

No. Apply will-change only to elements that are actually animating, since each promoted layer consumes memory. Setting it or force3D on every element just in case wastes resources and can hurt performance.