gsap-performance

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

Updated Jun 17, 2026
One-click install
npx skills add https://github.com/KKChen666/TongXiao --skill gsap-performance-kkchen666
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gsap-performance
Source: https://github.com/KKChen666/TongXiao/tree/main/.opencode/skills/gsap-performance
Command: npx skills add https://github.com/KKChen666/TongXiao --skill gsap-performance-kkchen666

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? GSAP animations can cause jank, dropped frames, and layout thrashing when developers animate layout-heavy properties or create excessive tweens. This Skill provides concrete rules and patterns to keep animations on the compositor thread at 60fps. ## Core Features & Use Cases - Transform-First Animation: Enforces animating x, y, scale, rotation, 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 separate 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 this Skill to replace left/top animations with transforms, add will-change hints, and kill off-screen tweens. ## Quick Start Ask the AI to review your GSAP animation code for performance issues and rewrite it following 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.

How to optimize GSAP mouse follower animations?

Use gsap.quickTo() for frequently updated properties like mouse follower x and y positions. It reuses a single tween instead of creating a new tween on every mousemove event, reducing overhead.

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.

When should I call ScrollTrigger.refresh()?

Call ScrollTrigger.refresh() only when the layout actually changes, such as after content loads. Do not call it on every resize, and debounce it when possible to avoid unnecessary recalculation.

Why do GSAP animations stutter with many elements?

Stutter occurs when hundreds of simultaneous tweens run or when animating layout properties. Use stagger instead of separate tweens, virtualize long lists, and pause or kill off-screen animations.