gsap-core

Create GSAP tweens with matchMedia for responsive, reduced-motion-aware animations.

8|Updated Aug 25, 2020
One-click install
npx skills add https://github.com/braswelljr/braswelljr --skill gsap-core-braswelljr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gsap-core
Source: https://github.com/braswelljr/braswelljr/tree/main/.agents/skills/gsap-core
Command: npx skills add https://github.com/braswelljr/braswelljr --skill gsap-core-braswelljr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the frustration of building inconsistent, hard-to-control JavaScript animations that lack cross-framework compatibility and accessibility support, providing a robust, production-ready animation engine for web projects.

Core Features & Use Cases

  • Core Tween Control: Create, pause, reverse, and sequence single or multiple element animations using gsap.to(), from(), and fromTo() methods for entrances, exits, and interactive state changes.
  • Responsive & Accessible Animations: Use gsap.matchMedia() to adapt animations to different screen sizes and automatically respect user prefers-reduced-motion settings for better accessibility compliance.
  • Use Case: For example, build a product card hover animation that scales and rotates the card on desktop, disables animation for users who prefer reduced motion, and reverts cleanly when the component unmounts.

Quick Start

Use the gsap-core skill to create a fade-in animation for the hero section that respects users' reduced motion preferences and works across desktop and mobile screen sizes.

Frequently Asked Questions about gsap-core

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

FAQPage Schema
How do I build JavaScript animations that respect prefers-reduced-motion settings?

Use gsap.matchMedia() to register responsive animation breakpoints that automatically disable or adjust tween animations when users enable prefers-reduced-motion. This ensures your JavaScript animations remain accessible and automatically clean up when media query conditions no longer match.

Can I use GSAP core for DOM and SVG animations across React, Vue, and Svelte?

GSAP core works across React, Vue, Svelte, and vanilla JS projects to animate DOM and SVG elements. It provides cross-framework compatible tween creation, easing configuration, stagger effects, and transform animation capabilities for consistent JavaScript animations.

What is the best way to create responsive web animations that adapt to different screen sizes?

Use gsap.matchMedia() to create responsive web animations that adapt to different screen sizes by registering breakpoint-specific tween configurations. This approach automatically reverts and cleans up animations when media query conditions no longer match, preventing inconsistent behavior across devices.

How do I sequence multiple element animations with GSAP for entrance and exit effects?

Use gsap.to(), from(), and fromTo() methods to create, pause, reverse, and sequence single or multiple element animations. Apply stagger effects and easing configurations to build smooth entrance, exit, and interactive state change animations.

Why do my JavaScript animations break when the component unmounts in my framework?

Animations break on unmount when cleanup is not handled automatically. GSAP core reverts and cleans up animations when media query conditions no longer match, preventing orphaned tweens and inconsistent behavior during component unmounts across React, Vue, and Svelte.

Do I need GSAP core to animate SVG elements with JavaScript in my web project?

You need GSAP core if your web project requires performant SVG animations with accessibility support, responsive breakpoints, and cross-framework compatibility. It provides tween creation, transform animation, and automatic cleanup that vanilla JavaScript animation solutions lack natively.