Skill library

Agent skill Web motion

GSAP Frameworks

Design, implement or review motion on the web.

  • Animation

Install the skill

Installation method

Run the command from your project root with Node.js and npm.

npx skills@latest add greensock/gsap-skills --skill gsap-frameworks --agent claude-code --yes

Check this file in your project.claude/skills/gsap-frameworks/SKILL.md

Other ways to install
  • Choose an assistant interactively

    npx skills@latest add greensock/gsap-skills --skill gsap-frameworks

    Select your assistant and choose the project installation scope.

    Official instructions

The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. A Vue component with a root template ref, an existing way to mount or remove it, and GSAP in the app.

View operation manual

What this skill helps with

  • Design, implement or review motion on the web.

Good for

  • Web motion and transitions
Publisher
GreenSock
Installed content
SKILL.md with workflow guidance
Result
A scoped Vue animation with a repeatable mount and unmount check.
Skill name
gsap-frameworks

Common pitfall

Avoid this prompt

Run gsap.to(".item", …) anywhere the component is created.

A shared selector can target another instance, and calling DOM code before mount can run before the elements are available.

Use these steps

  1. Find the root ref, animated descendants, and lifecycle hooks.
  2. Create animations after mounting and revert the context when the component unmounts.
  3. Exercise instance isolation and teardown while an animation is running.

Hands-on walkthrough

Give each instance of a Vue component independent motion and clean up its animation on unmount.

Give each instance of a Vue component independent motion and clean up its animation on unmount.

  1. Identify the instance boundary

    Find the root ref, animated descendants, and lifecycle hooks.

    Prompt · Step 1
    Use gsap-frameworks to inspect [Vue component]. Identify its root template ref, CSS selector for the target descendants, and an existing route or toggle that unmounts it. Show where DOM-only work belongs and how you will render two instances for a scope test.
  2. Create a scoped context

    Create animations after mounting and revert the context when the component unmounts.

    Prompt · Step 2
    Inside onMounted, create the animation in gsap.context(() => { … }, root.value) after confirming the root exists. Save that context in the component and call ctx.revert() in onUnmounted. Remove any native listeners that you add. Keep the pre-mount markup usable in server-rendered views.
  3. Test two instances and a remount

    Exercise instance isolation and teardown while an animation is running.

    • The second instance and unrelated sibling remain static.
    • Remount restores startup styles and gives each trigger one response.
    Prompt · Step 3
    Render two instances and an unrelated sibling with the same target class. Trigger the first instance and verify the others remain static. Unmount the active instance mid-animation, remount it, and verify the initial styles and a single response per trigger. If the app uses SSR, check the initial render and hydration console too. Report what ran.

API lookup

Use these calls when adapting the walkthrough to your component.

Scope Vue selectorsGSAP
Command or reference
gsap.context(callback, root.value)
Examples
Pass the actual root element from its template ref after mount.
Release managed animationsGSAP
Command or reference
ctx.revert()
Examples
Call in Vue onUnmounted or in a synchronous Svelte onMount disposer.

FAQ

How does a Svelte component clean up?

Create the scoped GSAP context in onMount and return a synchronous function that calls ctx.revert(). Remove any DOM listeners you installed in the same cleanup.

What does installing the skill add?

The project skill folder contains the publisher’s SKILL.md. Your application still needs its own GSAP dependency and a page to run the animation.