gsap-astro
GSAP Astro
mount → initial state → intro → settled → outro → end state → unmount
Without <ClientRouter />, use gsap-vanilla for full document loads. With it, mount and unmount correspond to body swaps; module scripts, global listeners, timelines, and persisted elements can survive. Animation owns the five phases between swaps.
Keep the requested look and existing project conventions. Add GSAP/plugins only as needed; do not replace the chosen animation library unless asked.
This skill decides when motion runs. For what moves, and for a feel such as premium or playful, also load the animaxxing skill when it is installed: its recipes and its guide to finding the vibe plug into this lifecycle.
Start with the project
Read repository instructions, existing animation, layouts, navigation, CSS, accessibility conventions, and checks. Then:
- Read the installed Astro version. Read
node_modules/astro/dist/transitions/router.js,swap-functions.js, andnode_modules/astro/components/ClientRouter.astrobefore trusting memory; the package ships no changelog, so check the release notes for that version. Version gates:<ClientRouter />(5.0;<ViewTransitions />in 4.x, removed in 6.0), lifecycle events withloaderandnewDocument(3.6), form navigation (4.0),transition:persist-propsanddata-astro-rerun(4.5),swapFunctions(4.15). - Find where
<ClientRouter />is: the shared head, some pages, or nowhere, and itsfallbackprop. Nowhere meansgsap-vanilla, including CSS@view-transition. - Find which framework integrations render islands and which
client:*directives are in use. - Check
astro.configforprefetchandexperimental.clientPrerender.