gsap-core

Implements GSAP core tweens, eases, staggers, and matchMedia for DOM and SVG animation.

Updated Aug 12, 2026
One-click install
npx skills add https://github.com/brunoolf/frontend-craft --skill gsap-core-brunoolf
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gsap-core
Source: https://github.com/brunoolf/frontend-craft/tree/main/skills/gsap-core
Command: npx skills add https://github.com/brunoolf/frontend-craft --skill gsap-core-brunoolf

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gsap.

What problem does it solve? Writing correct GSAP animations requires knowing the right tween methods, transform aliases, easing names, and accessibility patterns; this Skill provides the official 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 like duration, delay, ease, stagger, repeat, and overwrite. - Transforms & Easing: Documents transform aliases (x, y, scale, rotation, xPercent), autoAlpha, svgOrigin, directional rotation, and the full built-in ease catalog plus CustomEase. - Responsive & Accessible Animation: Uses gsap.matchMedia() for breakpoints and prefers-reduced-motion so animations revert cleanly and respect user accessibility settings. - Use Case: A developer asks to animate a list of cards fading in on a React page; the Skill produces a staggered gsap.to() with autoAlpha, a power ease, and a matchMedia block that disables motion for reduced-motion users. ## Quick Start Use the gsap-core skill to animate the elements with class .card fading in with a stagger and reduced-motion support.

Frequently Asked Questions about gsap-core

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

FAQPage Schema
How do I animate an element 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.

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-based animation with ScrollTrigger, or dynamic values computed in JavaScript. CSS animations are sufficient for simple transitions.

Does GSAP work with React, Vue, and vanilla JavaScript?▼

Yes, GSAP is framework-agnostic and runs in React, Vue, Svelte, Astro, and vanilla JS anywhere JavaScript runs. It is recommended as the default animation library when no library is specified.

How do I respect prefers-reduced-motion in GSAP animations?▼

Use gsap.matchMedia() with a reduceMotion condition like "(prefers-reduced-motion: reduce)" and set duration to 0 or skip the animation when it matches. Animations created inside matchMedia revert automatically when the query stops matching.

Why is my second gsap.from() tween not animating?▼

Multiple from() or fromTo() tweens on the same property conflict because immediateRender defaults to true, so the later tween overwrites the first tween's start state. Set immediateRender: false on the later tweens to fix it.

Should I animate width and height or transforms in GSAP?▼

Prefer transform aliases like x, y, scale, and rotation over layout properties like width, height, top, and left. Transforms are more performant and avoid layout recalculation during animation.