gsap-performance

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

Updated May 5, 2026
One-click install
npx skills add https://github.com/josippapez/ai-setup --skill gsap-performance-josippapez
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gsap-performance
Source: https://github.com/josippapez/ai-setup/tree/main/claude/plugins/better-design/skills/gsap-performance
Command: npx skills add https://github.com/josippapez/ai-setup --skill gsap-performance-josippapez

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? GSAP animations can cause jank, dropped frames, and layout thrashing when they animate layout-heavy CSS properties or create excessive 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, 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 user reports a laggy scroll-driven animation or a janky mouse-follower effect, apply these rules to replace layout-triggering properties with x/y transforms and consolidate 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 and opacity properties, which stay on the compositor and avoid layout and paint. Use x and y instead of left and top, add will-change: transform to animating elements, and avoid creating hundreds of simultaneous tweens.

How to optimize a GSAP mouse follower animation?

Use gsap.quickTo() for mouse follower x and y properties instead of creating a new tween on every mousemove event. quickTo reuses a single tween instance, which is far more efficient for frequently updated values.

Which CSS properties should I avoid animating with GSAP?

Avoid animating width, height, top, left, margin, and padding because they trigger layout recalculation and cause jank. Use transform-based properties like x, y, scale, and rotation to achieve the same visual effect on the compositor.

When should I call ScrollTrigger.refresh()?

Call ScrollTrigger.refresh() only when the page layout actually changes, such as after content loads, not on every resize event. Debounce the calls when possible to avoid unnecessary recalculation work during scrolling.

Why does my GSAP animation jank on low-end devices?

Jank usually comes from animating layout properties, running too many simultaneous tweens, or leaving off-screen animations active. Simplify or sequence animations, kill off-screen tweens, and test scrub values on low-end hardware.