gsap-performance

Optimizes GSAP animations for smooth 60fps rendering using transforms and batching.

Updated Aug 28, 2026
One-click install
npx skills add https://github.com/trobias/portfolio-nextjs-v2 --skill gsap-performance-trobias
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gsap-performance
Source: https://github.com/trobias/portfolio-nextjs-v2/tree/main/.agents/skills/gsap-performance
Command: npx skills add https://github.com/trobias/portfolio-nextjs-v2 --skill gsap-performance-trobias

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 excessive tweens. This Skill provides concrete rules and patterns to keep animations on the compositor thread and maintain smooth 60fps rendering. ## Core Features & Use Cases - Compositor-Friendly Properties: Guides you to animate transform and opacity instead of width, height, top, or left to avoid layout and paint costs. - Efficient Update Patterns: Recommends gsap.quickTo() for frequently updated properties like mouse followers, and stagger instead of many manual tweens. - ScrollTrigger Tuning: Covers pin promotion, scrub values, and debounced ScrollTrigger.refresh() calls to reduce scroll-related work. - Use Case: When a page with scroll-driven animations stutters on low-end devices, apply these rules to replace layout-triggering properties with x/y transforms, batch reads and writes, and kill off-screen tweens. ## Quick Start Ask the AI to review your GSAP animation code for performance issues and rewrite it following the 60fps best practices.

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 thread. Avoid animating width, height, top, left, margin, or padding since they trigger layout and paint, causing jank.

What is gsap.quickTo() and when should I use it?▼

gsap.quickTo() creates a single reusable tween for properties updated frequently, such as mouse-follower x/y positions. It avoids creating a new tween on every mousemove event, reducing overhead significantly.

Should I use will-change on all animated elements?▼

No, apply will-change: transform only to elements that will actually animate. Setting it on every element wastes memory and compositor resources without benefit.

Why does my ScrollTrigger animation stutter on scroll?▼

Stuttering often comes from calling ScrollTrigger.refresh() too often or pinning too many elements. Call refresh() only when layout actually changes, debounce resize handlers, and consider a small scrub value like scrub: 1.

How do I animate many elements without performance issues?▼

Use GSAP's stagger feature instead of creating many separate tweens with manual delays. For long lists, animate only visible items or use virtualization, and reuse timelines rather than creating new ones every frame.