gsap-frameworks

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

2|Updated Jul 25, 2026
One-click install
npx skills add https://github.com/ankaboot-source/boucle --skill gsap-frameworks-ankaboot-source
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gsap-frameworks
Source: https://github.com/ankaboot-source/boucle/tree/main/.jcode/skills/gsap-frameworks
Command: npx skills add https://github.com/ankaboot-source/boucle --skill gsap-frameworks-ankaboot-source

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gsap.

What problem does it solve? GSAP animations in component frameworks often leak memory, target elements outside the component, or run before the DOM exists. This Skill provides correct lifecycle patterns for creating and destroying GSAP tweens and ScrollTriggers in Vue, Nuxt, and Svelte. ## Core Features & Use Cases - Lifecycle-safe animation setup: Create tweens inside onMounted/onMount and revert them with gsap.context() and ctx.revert() on unmount. - Scoped selectors: Pass a container ref to gsap.context() so selectors like .box only match elements inside the component. - Nuxt composable with lazy loading: A typed useGSAP composable that registers plugins once and lazy-loads rarely used plugins like SplitText or MorphSVG to reduce bundle size. - Use Case: You are building a Vue 3 landing page with scroll-triggered reveals. Use this Skill to wrap animations in gsap.context(container.value), register ScrollTrigger once at app level, and call ctx.revert() in onUnmounted so navigating away leaves no orphaned triggers. ## Quick Start Add GSAP scroll-triggered animations to my Vue 3 component with proper scoping and 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. In onUnmounted, call ctx.revert() to kill all tweens and ScrollTriggers and revert inline styles.

How to add GSAP animations in Svelte with onMount?

Use bind:this to capture the container element, then create animations inside onMount wrapped in gsap.context with that element as scope. Return a cleanup function from onMount that calls ctx.revert() so animations are destroyed with the component.

Does GSAP work with Nuxt and SSR?

Yes, GSAP works in Nuxt when animations run only after mount, never during server rendering. Register plugins once in a composable like useGSAP, and lazy-load rarely used plugins such as SplitText or MorphSVG to keep the initial bundle small.

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

Global selector strings like .box match elements anywhere in the document. Pass the component's container element as the second argument to gsap.context() so selectors only search within that subtree.

Should I use gsap-frameworks or gsap-react for React projects?

For React, use the gsap-react skill, which covers the useGSAP hook and contextSafe patterns. This skill targets Vue, Nuxt, Svelte, and other lifecycle-based frameworks instead.