gsap-frameworks

Coordinate lifecycle-aware GSAP animations for Vue, Nuxt, and Svelte components.

Updated Apr 12, 2026
One-click install
npx skills add https://github.com/Bharathadi01/export-work --skill gsap-frameworks-bharathadi01
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gsap-frameworks
Source: https://github.com/Bharathadi01/export-work/tree/main/.agents/skills/gsap-frameworks
Command: npx skills add https://github.com/Bharathadi01/export-work --skill gsap-frameworks-bharathadi01

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill guides developers in implementing reliable, lifecycle-aware animations across Vue, Nuxt, Svelte, and other frameworks that use mounted/unmounted hooks, ensuring animations run only after the DOM is ready and are properly cleaned up to prevent leaks.

Core Features & Use Cases

  • Lifecycle-safe GSAP usage: run animations after the component is in the DOM and revert on unmount.
  • Scoped selectors: use gsap.context to confine animations to a component root, preventing side effects across the page.
  • Framework coverage: patterns for Vue 3 (composition API), onMounted/onUnmounted, Svelte, and similar frameworks; guidance on when to use gsap-react for React.

Quick Start

Create animations inside the framework’s mounted lifecycle using gsap.context with a component root, and revert on unmount to clean up.

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 animations with Vue 3 component lifecycle hooks?

To scope GSAP animations in Vue or Svelte, use gsap.context within the component's mounted hook, passing the component root element, which confines selectors to that component and prevents animation side effects across the page.

Why do my GSAP animations break or cause memory leaks in Svelte components?

GSAP animations break or leak in Svelte when they are not properly scoped or cleaned up. You must initialize them inside onMount using gsap.context and revert the context during the destroy lifecycle to remove lingering animation references.

What's the best way to scope GSAP selectors to a single component?

The best way to scope GSAP selectors is to use gsap.context. By wrapping your animation timeline in a context linked to a specific component root element, you ensure selectors only target elements within that component's DOM tree.

Does GSAP work with Nuxt and other component-based frameworks?

Yes, GSAP works with Nuxt and other component-based frameworks. It requires lifecycle-aware implementation patterns, ensuring animations execute after DOM mounting and are reverted during component unmounting to avoid side effects.

When should I use gsap.context for frontend animations?

You should use gsap.context for frontend animations whenever you need to scope animations to a specific component root and automatically clean them up on unmount, which is essential for preventing memory leaks in component-based applications.