gsap-frameworks

Manage GSAP animations in Vue and Svelte with lifecycle cleanup.

Updated May 31, 2026
One-click install
npx skills add https://github.com/fanguyun/SkillManager --skill gsap-frameworks-fanguyun
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gsap-frameworks
Source: https://github.com/fanguyun/SkillManager/tree/main/gsap-frameworks
Command: npx skills add https://github.com/fanguyun/SkillManager --skill gsap-frameworks-fanguyun

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gsap, vue, svelte, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the need for GSAP animations in Vue, Svelte, and other non-React frameworks, providing lifecycle management, scoping selectors, and cleanup on unmount.

Core Features & Use Cases

  • Lifecycle Management: Use GSAP animations after the component's DOM is available and clean up on unmount.
  • Scoping Selectors: Scope selectors to the component root to avoid conflicts with other elements.
  • Use Case: When developing a Vue or Svelte application that requires complex animations and need to ensure they are scoped correctly and cleaned up properly.

Quick Start

Use the gsap-frameworks skill to animate a box element in Vue 3 with gsap context and onMounted lifecycle hook.

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 in Vue 3 without causing memory leaks?

GSAP animations in Vue require proper lifecycle management to avoid memory leaks. You must initialize animations within the onMounted lifecycle hook and use GSAP context for scoping selectors, ensuring proper cleanup when the component unmounts to prevent orphaned animation instances.

What is the best way to scope GSAP selectors in Svelte components?

Scoping GSAP selectors in Svelte involves binding the animation context to the component root element. This prevents selector conflicts with other elements by isolating GSAP queries to the specific component's DOM tree, ensuring animations only target intended elements.

Can I use GSAP for component-based animations in Vue and Svelte?

GSAP is fully compatible with Vue and Svelte for component-based animations. It handles complex animation sequences while respecting component lifecycle events, ensuring DOM elements are available before animation initialization and cleaned up properly on component destruction.

Do I need to install GSAP plugins for Vue and Svelte framework integration?

Using GSAP with Vue and Svelte requires installing the core GSAP library alongside framework-specific plugins. These dependencies are essential for handling non-React framework lifecycle events, scoping selectors, and managing animation cleanup during component unmounting.

Why does my GSAP animation break when the Svelte component unmounts?

GSAP animations break on Svelte component unmount due to missing cleanup logic. Without proper lifecycle management to revert animated properties and kill active tweens, the animation context persists, causing errors when the underlying DOM elements are destroyed.

Does the gsap-frameworks skill support React component lifecycle management?

The gsap-frameworks skill targets non-React frameworks like Vue and Svelte. It specifically provides GSAP animation capabilities and lifecycle management for component-based architectures outside the React ecosystem, handling scoping and cleanup for those environments.