Skip to content
greensock avatar

Gsap Frameworks

Lifecycle-safe GSAP patterns for Vue, Nuxt, and Svelte, scoped with gsap.context and reverted on unmount.

CCM score
74 of 100
skills.sh installs
84.2K
GitHub stars
19.3K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers creating tweens and ScrollTriggers after mount and reverting them on unmount in Vue 3, Nuxt 4, and Svelte
  • Includes runnable examples/vue/ and examples/nuxt/ projects, plus a Nuxt composable that registers plugins and lazy-loads less common ones
  • Enforces scoped selectors via gsap.context(scope) and ctx.revert() so no animation runs on detached nodes
  • Designed for Vue, Nuxt, Svelte, and SvelteKit projects where React-specific guidance does not apply

Install

$ npx -y skills add greensock/gsap-skills --skill gsap-frameworks -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

GSAP with Vue, Svelte, and Other Frameworks

When to Use This Skill

Apply when writing or reviewing GSAP code in Vue (or Nuxt), Svelte (or SvelteKit), or other component frameworks that use a lifecycle (mounted/unmounted). For React specifically, use gsap-react (useGSAP hook, gsap.context()).

Related skills: For tweens and timelines use gsap-core and gsap-timeline; for scroll-based animation use gsap-scrolltrigger; for React use gsap-react.

Principles (All Frameworks)

  • Create tweens and ScrollTriggers after the component’s DOM is available (e.g. onMounted, onMount).
  • Kill or revert them in the unmount (or equivalent) cleanup so nothing runs on detached nodes and there are no leaks.
  • Scope selectors to the component root so .box and similar only match elements inside that component, not the rest of the page.

Vue 3 (Composition API)

See examples/vue/ for a runnable Vite + Vue 3 project demonstrating these patterns.

Use onMounted to run GSAP after the component is in the DOM. Use onUnmounted to clean up.

Details

Repository
github.com/greensock/gsap-skills
Categories
Animation & Motion, Frontend & UI Code
First seen
Apr 16, 2026

Questions

What does the gsap-frameworks skill do?

The gsap-frameworks skill teaches agents to write GSAP animation code for Vue, Nuxt, Svelte, SvelteKit and other non-React frameworks. It covers the component lifecycle, scoping selectors to the component root, and cleaning up tweens and ScrollTriggers on unmount.

How do I install the gsap-frameworks skill?

Run npx -y skills add greensock/gsap-skills --skill gsap-frameworks -y in your project. After that, the agent can use the skill to write GSAP code for Vue, Nuxt or Svelte components.

Which frameworks does gsap-frameworks cover, and when should I use gsap-react instead?

It covers Vue 3 with Composition API and script setup, Nuxt 4, and Svelte, using onMounted, onMount and onUnmounted or onDestroy patterns. For React projects, the skill directs you to gsap-react, which uses the useGSAP hook and gsap.context().

Where does gsap-frameworks rank among Animation & Motion skills?

On the Animation & Motion category page, gsap-frameworks ranks in the top 50. The other top skills in that category include remotion-render and several hyperframes skills, and this one is specific to animating components in non-React frameworks.

More from greensock/gsap-skills

All 8

Similar to Gsap Frameworks

More Animation & Motion