gsap-frameworks

Implements GSAP animations in Vue, Nuxt, and Svelte with lifecycle-safe cleanup.

Updated Aug 10, 2026
One-click install
npx skills add https://github.com/KryptaMedina7/quero-s-home --skill gsap-frameworks-kryptamedina7
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gsap-frameworks
Source: https://github.com/KryptaMedina7/quero-s-home/tree/main/.agents/skills/gsap-frameworks
Command: npx skills add https://github.com/KryptaMedina7/quero-s-home --skill gsap-frameworks-kryptamedina7

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gsap.

What problem does it solve? GSAP animations in component frameworks often leak memory, target wrong elements, or run before the DOM exists because developers skip lifecycle-aware setup and cleanup. This Skill provides correct patterns for creating, scoping, and reverting GSAP tweens and ScrollTriggers in Vue, Nuxt, and Svelte. ## Core Features & Use Cases - Lifecycle-Safe Setup: Create animations inside onMounted/onMount and revert them with ctx.revert() on unmount to prevent leaks and detached-node errors. - Scoped Selectors: Use gsap.context(callback, scope) so selectors like .box only match elements inside the current component. - Nuxt Plugin Management: A typed useGSAP composable registers plugins once and lazy-loads rarely used plugins like SplitText or MorphSVG to reduce bundle size. - Use Case: A developer building a Nuxt landing page needs scroll-triggered reveals per component; this Skill shows how to register ScrollTrigger once, scope animations per component, and clean up on route change. ## Quick Start Show me how to add a GSAP scroll-triggered fade-in animation to my Vue 3 component with proper cleanup on unmount.

Frequently Asked Questions about gsap-frameworks

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

FAQPage Schema
How do I use GSAP in a Vue 3 component?

Create animations inside onMounted using gsap.context(callback, container.value) so selectors are scoped to the component root. Store the context and call ctx.revert() in onUnmounted to kill tweens and ScrollTriggers and revert inline styles.

How to add GSAP ScrollTrigger in Nuxt with SSR?

Register ScrollTrigger once in a useGSAP composable rather than per component. Create ScrollTriggers inside gsap.context after mount, and lazy-load rarely used plugins like SplitText via dynamic imports to keep the initial bundle small.

Should I use gsap-react or this approach for React projects?

For React, use the gsap-react skill with the useGSAP hook and gsap.context(). This Skill targets Vue, Nuxt, Svelte, and other lifecycle-based frameworks, not React.

Why do my GSAP animations affect other components on the page?

Global selectors like gsap.to('.box') match elements across the entire page. Pass the component's container element as the second argument to gsap.context() so selectors only search within that subtree.

Why do GSAP animations keep running after my Svelte component is destroyed?

Animations persist because cleanup was skipped. Return a cleanup function from onMount that calls ctx.revert(), which kills all tweens and ScrollTriggers created in that context and reverts inline styles.