gsap-core

Implements GSAP core tweens, eases, staggers, and responsive matchMedia animations in JavaScript.

Updated May 23, 2026
One-click install
npx skills add https://github.com/Oatse/CWE-Automation --skill gsap-core-oatse
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gsap-core
Source: https://github.com/Oatse/CWE-Automation/tree/main/.agents/skills/gsap-core
Command: npx skills add https://github.com/Oatse/CWE-Automation --skill gsap-core-oatse

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gsap.

What problem does it solve? Writing DOM and SVG animations in JavaScript requires choosing the right tween methods, eases, and transform properties while avoiding common pitfalls like layout-thrashing properties, immediateRender conflicts, and missing reduced-motion support. This Skill provides the official GSAP core API guidance so animations are written correctly the first time. ## Core Features & Use Cases - Core Tween Methods: Covers gsap.to(), from(), fromTo(), and set() with correct vars usage including duration, delay, ease, stagger, repeat, yoyo, and overwrite. - Transforms & CSS Best Practices: Enforces camelCase properties, transform aliases (x, y, scale, rotation), autoAlpha over opacity, svgOrigin, directional rotation suffixes, and clearProps. - Responsive & Accessible Animation: Uses gsap.matchMedia() for breakpoint-based animations and prefers-reduced-motion handling with automatic revert on unmount. - Use Case: A developer building a landing page in React needs staggered entrance animations that respect reduced-motion preferences; this Skill produces gsap.to() calls with stagger objects wrapped in gsap.matchMedia() conditions. ## Quick Start Use the gsap-core skill to write a staggered fade-in animation for my card elements that respects prefers-reduced-motion.

Frequently Asked Questions about gsap-core

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

FAQPage Schema
How do I animate elements with GSAP in JavaScript?

Use gsap.to(target, vars) to animate from the current state to the values in vars, such as gsap.to(".box", { x: 100, duration: 1 }). Use gsap.from() for entrances and gsap.fromTo() when you need explicit start and end values.

What is the difference between gsap.to, from, and fromTo?

gsap.to() animates from the current state to the vars values, gsap.from() animates from the vars values to the current state, and gsap.fromTo() takes explicit start and end objects. from() and fromTo() render their start state immediately by default via immediateRender.

How do I stagger animations across multiple elements in GSAP?

Pass a stagger value in the vars object, either as a number of seconds like stagger: 0.1 or as an object such as { each: 0.1, from: "center" }. The from option accepts start, center, end, edges, random, or an index.

Does GSAP support prefers-reduced-motion accessibility?

Yes, gsap.matchMedia() accepts a prefers-reduced-motion query so you can set duration to 0 or skip animations for users who prefer reduced motion. All animations created inside a matching handler revert automatically when the query stops matching.

Why is my second gsap.from() animation not playing?

Multiple from() or fromTo() tweens on the same property of the same target conflict because immediateRender defaults to true. Set immediateRender: false on the later tweens so the first tween's end state is not overwritten before it runs.

When should I use GSAP instead of CSS animations?

Prefer GSAP when you need timeline sequencing, runtime control like pause, reverse, or seek, complex easing, scroll-driven animation, or dynamically calculated values. CSS animations are sufficient only for simple transitions.