gsap-nuxt
Skill5 starsChanged 2 months agoMITView on GitHub
Build or review GSAP animation in Nuxt 3 and Nuxt 4 projects: page and layout transitions through the pageTransition and layoutTransition JavaScript hooks, enter and exit motion, animated show and hide of conditional content, and scroll-driven effects across NuxtPage and NuxtLink navigation. Use whenever a Nuxt project needs any of these, even if GSAP is not named, and whenever definePageMeta, Vue Transition, onEnter, onLeave, page transitions, route transitions, keepalive, back and forward, layout jank, interrupted animations, or cleanup on navigation matter. Also use to choose between GSAP, Vue Transition CSS, and Nuxt's experimental View Transitions for a navigation effect. Not for plain Vue without Nuxt, which gsap-frameworks covers, and not for isolated GSAP API questions.
1 other project uses a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- johnpolacek/animaxxing-skillsedited, first seen Nov 1, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- johnpolacek/animaxxing-skills★ 2251% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository57 other files it gives its agents.
- adversarial-reviewSkill
- aesthetic-animaxxingSkill
- ai-search-optimizationSkill
- announceSkill
- audio-trackSkill
- blindspotSkill
- brave-wesSkill
- chrome-wesSkill
- clihubSkill
- dashclaw-governanceSkill
- deskclawSkill
- de-vibeSkill
- dispatch-blocksSkill
- epic-infographicsSkill
- fable-gptSkill
- frontend-verifySkill
- gsap-astroSkill
- gsap-coreSkill
- gsap-frameworksSkill
- gsap-nextjsSkill
- gsap-performanceSkill
- gsap-pluginsSkill
- gsap-react-routerSkill
- gsap-reactSkill
- gsap-scrolltriggerSkill
- gsap-sveltekitSkill
- gsap-tanstack-routerSkill
- gsap-timelineSkill
- gsap-utilsSkill
- gsap-vanillaSkill
- harness-healthSkill
- iphoneSkill
- landing-page-cro-expertSkill
- launchSkill
- launch-videoSkill
- logo-revealSkill
- marketingSkill
- marketing-studioSkill
- meditateSkill
- moleresearchSkill
- og-assetsSkill
- petstoreSkill
- phone-gotchasSkill
- phoneSkill
- preflightSkill
- product-demoSkill
- ship-itSkill
- shipSkill
- show-meSkill
- skillfindSkill
- social-clipSkill
- spec-probeSkill
- teamSkill
- tregSkill
- wes-voiceSkill
- wrapSkill
- xplainerSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. About 0 are common, 7 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Every animated page or component runs through the same lifecycle:
- Distinctive: line 19
Read repository instructions and the current code.
- Very specific: line 21
Read the installed Nuxt, Vue, and Vue Router versions from node_modules.
- Very specific: line 22
Read nuxt.config: ssr, srcDir, app.pageTransition, app.layoutTransition, app.keepalive, experimental.viewTransition, …
- Very specific: line 23
Look at app.vue, layouts, <NuxtPage> props, route middleware, global CSS, accessibility conventions, tests, and any animation library …
- Distinctive: line 24
Keep the project's package manager, language, file layout, styling, and component conventions.
- Very specific: line 26
Add GSAP or a plugin only when the requested motion needs it.
- Very specific: line 32
Use Vue Transition CSS (pageTransition: { name, mode } plus .name-enter-* and .name-leave-* rules) for a plain fade or slide of the whole …
- Very specific: line 41
Use GSAP through the pageTransition JavaScript hooks when the effect needs:
- Distinctive: line 59
Before calling work done: Verification.
- Very specific: line 82
Always call done: from onComplete, from onInterrupt, and synchronously under reduced motion.
- Very specific: line 84
Keep outgoing pages and components in the DOM through outro and end state.
- Very specific: line 88
When outgoing and incoming content overlap (no mode), only the stable wrapper takes up space in the layout.
- Very specific: line 89
Never use appear on a server-rendered page: Vue's SSR wraps the child of <Transition appear> in <template>, so the page is blank until …
- Distinctive: line 90
Keep native link behavior, focus, scroll, and no-JavaScript readability.
- Very specific: line 93
Prefer transforms and autoAlpha.
- Distinctive: line 94
Use timelines for sequences.
- Distinctive: line 95
Verify in a real browser when practical.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GSAP Nuxt
Every animated page or component runs through the same lifecycle:
mount → initial state → intro → settled → outro → end state → unmount
Mount and unmount belong to Vue. The five phases between them belong to your animation code and happen while the node exists. Nuxt adds a twist: <NuxtPage> wraps every page in Vue's <Transition> and <Suspense>, so the page component is torn down the moment its outro starts and only the root element lives on until done is called. This skill covers getting the five phases right under that model: hydration, navigation timing, page keys, interruptions, and cleanup. The user's request and the existing design decide how things look.
Start with the project
- Read repository instructions and the current code.
- Confirm Nuxt with a
pages/directory. If the project is plain Vue with Vue Router and no Nuxt, say this skill does not cover it and usegsap-frameworks. - Read the installed Nuxt, Vue, and Vue Router versions from
node_modules. Prefer the installed types and their JSDoc (node_modules/@nuxt/schema,node_modules/nuxt/dist,node_modules/@vue/runtime-core/dist,node_modules/vue-router/dist) and that version's docs over memory. Version gates:onPrehydrate(3.12),useRuntimeHook(3.14), theapp/source directory (4), view transition types (4.4),prefetchin the<NuxtLink custom>slot (4.5). - Read
nuxt.config:ssr,srcDir,app.pageTransition,app.layoutTransition,app.keepalive,experimental.viewTransition,future.compatibilityVersion. Nuxt 4 putspages/,layouts/,middleware/,plugins/,composables/,app.vue, androuter.options.tsunderapp/; Nuxt 3 keeps them at the root.~/resolves to the source directory in both. - Look at
app.vue, layouts,<NuxtPage>props, route middleware, global CSS, accessibility conventions, tests, and any animation library already in use. - Keep the project's package manager, language, file layout, styling, and component conventions.
Add GSAP or a plugin only when the requested motion needs it. Do not replace an animation library the project already chose unless asked. If the project already has the useGSAP composable from gsap-frameworks, register and lazy-load plugins through it.
Pick GSAP, Vue Transition CSS, or View Transitions per effect
Three engines can move a Nuxt route change. Pick one per element per transition.
Use Vue Transition CSS (pageTransition: { name, mode } plus .name-enter-* and .name-leave-* rules) for a plain fade or slide of the whole page with no sequencing. It needs no lifecycle code.
Use experimental.viewTransition for:
- A shared element that morphs between two routes.
- A whole-page slide or crossfade keyed by view transition types.
It falls back to an instant swap in unsupported browsers and skips itself under reduced motion unless set to 'always'.
Use GSAP through the pageTransition JavaScript hooks when the effect needs:
- Sequenced timing across many targets, split text, or scroll-linked progress.
- Interruption, reversal, or scrubbing mid-transition. A view transition is a fixed pair of snapshots.
- An outro on the live page with a completion callback that gates removal, focus, or scroll.
- Both pages on screen at once under your control.
Mixing is fine across elements: the browser morphs one image while GSAP animates the rest. Never give one element to both in the same transition, and never run the Vue hooks and a view transition on the same navigation. See View Transitions.
Follow the requested motion
The user's request decides effects, direction, timing, easing, and intensity. Map it onto the five phases without changing the look. For anything unspecified, keep the project's existing convention or pick a quiet default.
Read only what you need
- The hooks,
done, modes, what dies when the leave starts, first load, layouts, direction, interruptions: Page transitions. - Page keys, keepalive, Nuxt app hooks, scroll and focus, outro before navigation, back and forward, View Transitions, SSR and first paint: Navigation.
- The five phases, GSAP setup, Vue lifecycle, show and hide, layout stability, scroll, text, plugins: Lifecycle implementation.
- Before calling work done: Verification.
The official GSAP skills (gsap-core, gsap-frameworks, gsap-timeline, gsap-scrolltrigger, gsap-plugins, gsap-utils, gsap-performance) cover the GSAP API and the Vue component basics: onMounted, gsap.context, revert on unmount, and the Nuxt useGSAP composable. This skill covers how GSAP fits Nuxt routing and page lifetime.
Pieces to add, only as needed
- One client-only plugin or the
useGSAPcomposable that registers GSAP and plugins once. - A page transition module exporting one hook set (
onBeforeEnter,onEnter,onAfterEnter,onEnterCancelled,onBeforeLeave,onLeave,onAfterLeave) withcss: false, applied through<NuxtPage :transition>app-wide ordefinePageMeta({ pageTransition })per page. - An inline head script and matching CSS rule that hide intro targets before first paint on server-rendered pages.
- Data attributes marking the elements a page animates. The hooks receive only
el; template refs are gone by then. - A controller per page or component that owns its five phases.
- Intro and outro timeline builders that also call
done. - A route middleware that sets
to.meta.pageTransition.namewhen direction depends on the route pair. - A
<Transition :css="false">with the same hooks around conditional content that must stay mounted through its outro.
Persistent header, nav, and footer live in app.vue or a shared layout, outside <NuxtPage>. A component owns its own lifecycle; the transition hooks own page lifecycles.
Rules
- GSAP runs only on the client. Guard with
import.meta.client,onMounted, or<ClientOnly>. Scope selectors. Clean up every tween, trigger, split, and listener. - Lay out the final page with normal CSS first. One stable wrapper owns the geometry through every phase. Pages and layouts need a single root element or the transition does not run.
- Mount, then set initial values, then paint.
onBeforeEnterruns before the incoming root is inserted andonEnterright after, before the browser paints. Users never see the settled state before the intro. - Animate to one settled state and clear temporary styles there.
- Always call
done: fromonComplete, fromonInterrupt, and synchronously under reduced motion. A leave that never callsdoneleaves the old page in the DOM forever. - The page component is unmounted, or deactivated under keepalive, when the leave starts, not when it ends. Its context revert and
onUnmountedrun while the outro plays. Build the outro inonLeaveagainstel, in a context the hooks own. - Keep outgoing pages and components in the DOM through outro and end state. Vue does this as long as
donewaits. - The outro cannot start before the incoming page has resolved. Design the wait: the old page stays on screen and interactive.
- Under keepalive, a page lifecycle runs again on reactivation against DOM that already holds settled values. Never assume a fresh node.
- Back and forward run the same hooks as a click. Detect history navigation yourself and give it a quieter path. Never fake an outro that did not happen.
- When outgoing and incoming content overlap (no
mode), only the stable wrapper takes up space in the layout. - Never use
appearon a server-rendered page: Vue's SSR wraps the child of<Transition appear>in<template>, so the page is blank until hydration and without JavaScript. - Keep native link behavior, focus, scroll, and no-JavaScript readability.
- Prepare incoming targets before revealing the swap. Never flash settled or stale content.
- Reduced motion reaches the same settled state and still calls
doneand every completion callback. - Prefer transforms and
autoAlpha. Setwill-changeonly while animating, then clear it. - Use timelines for sequences. Decide up front what happens on rapid clicks and interrupted animations.
- Verify in a real browser when practical. Use a production build for route, config, dependency, or release changes.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

