{"name":"add-scroll-animations","description":"Adds a few scroll-linked motions - fade-in on enter, a pinned panel, or a progress cue - with GSAP ScrollTrigger or Motion, and respects reduced motion. Use when the user wants a scroll animation, a fade-in as they scroll, parallax, or a pinned section.","category":"design","tags":["scroll","motion"],"models":["any"],"proven":false,"passing_families":0,"model_testing":"Not yet model-tested; testing Jan 2027","url":"https://theskillvault.ai/skills/add-scroll-animations","api_url":"https://theskillvault.ai/api/skills/add-scroll-animations","raw_url":"https://theskillvault.ai/api/skills/add-scroll-animations/raw","body":"# Add scroll animations\n\nMotion should explain the page, not decorate every block. Start with the smallest effect that still reads. Skip it when the visitor asks for less motion.\n\n## When to use\n- Sections should fade or slide in as they enter the viewport.\n- One panel should stay pinned while later content moves past it.\n- A bar should track how far down the page the reader is.\n\n## When not to use\n- The task is the headline, the call to action, or the section order. That is a page-structure task.\n- The layout overflows on a phone. Settle the layout, then add motion.\n- The user wants a theme, colours, or type scale.\n\n## Steps\n1. Pick one effect. Fade-on-enter, pin, or progress. Do not stack all three on the first pass.\n2. If the page is mostly static, a CSS animation plus an intersection check is enough. Reach for a library only when you need a pin or a scrubbed timeline.\n3. On a React page, use Motion (`motion`, or the older `framer-motion` package). `whileInView` with `viewport={{ once: true }}` covers a fade-in. `useScroll` plus `useTransform` covers a value tied to scroll position.\n4. For a pin, a horizontal strip, or a scrubbed timeline, use GSAP. Install `gsap`, import `ScrollTrigger`, and call `gsap.registerPlugin(ScrollTrigger)` once, first.\n5. Honour `prefers-reduced-motion: reduce`. Skip the tween and show the final state. In GSAP, `ScrollTrigger.matchMedia` can drop the motion. In Motion, skip the variant.\n6. On a client page, create the trigger after the node exists and kill it on unmount so a route change does not leave a stale pin.\n7. Scroll the page on a phone and on a wide window. The effect should not cause sideways overflow or a jump when it starts.\n\n```tsx\n<motion.section\n  initial={{ opacity: 0, y: 12 }}\n  whileInView={{ opacity: 1, y: 0 }}\n  viewport={{ once: true, amount: 0.3 }}\n  transition={{ duration: 0.4 }}\n>\n  {children}\n</motion.section>\n```\n\n## Gotchas\n- Do not animate a control that reveals a password, a token, or a private balance. Those should be visible without motion.\n- `once: true` is kinder than replaying the fade every time the block re-enters.\n- A pinned section that is taller than the screen traps the reader. Keep the pin short.\n- Register ScrollTrigger once. Registering inside a render loop leaks triggers.\n\n## Portability\nGSAP fits vanilla JS, Vue, and React. Motion fits React. If you use neither, a CSS `@keyframes` fade plus `IntersectionObserver` covers the enter effect. The reduced-motion check stays the same.\n\n## Done when\n- One scroll effect runs, and it is absent when reduced motion is set.\n- Triggers are cleaned up on unmount.\n- The page does not overflow sideways because of the motion.\n\n## Example prompt\n\"Fade each feature block in once as it enters the viewport, using Motion, and skip the animation when the user prefers reduced motion.\"\n\n---\nAdapted from \"gsap-framer-scroll-animation\" by Utkarsh Patrikar in github/awesome-copilot (MIT, Copyright GitHub, Inc.). See LICENSE.txt.","files":["LICENSE.txt"],"license":"MIT","license_name":"MIT License","license_url":"https://opensource.org/license/mit","attribution":"Based on work by Utkarsh Patrikar (github/awesome-copilot, gsap-framer-scroll-animation) (Copyright GitHub, Inc., MIT License), https://github.com/github/awesome-copilot/tree/5269f7ea2d6c3a9bfda5ed878b6726cf509121fd/skills/gsap-framer-scroll-animation; adapted by TheSkillVault, https://theskillvault.ai","install":{"claude_code":"curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/add-scroll-animations/raw' -o ~/'.claude/skills/add-scroll-animations/SKILL.md' && curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/add-scroll-animations/files/LICENSE.txt' -o ~/'.claude/skills/add-scroll-animations/LICENSE.txt'","cursor":"curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/add-scroll-animations/raw' -o '.cursor/skills/add-scroll-animations/SKILL.md' && curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/add-scroll-animations/files/LICENSE.txt' -o '.cursor/skills/add-scroll-animations/LICENSE.txt'","agents":"curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/add-scroll-animations/raw' -o '.agents/skills/add-scroll-animations/SKILL.md' && curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/add-scroll-animations/files/LICENSE.txt' -o '.agents/skills/add-scroll-animations/LICENSE.txt'","mcp_url":"https://theskillvault.ai/mcp","cursor_mcp_deeplink":"cursor://anysphere.cursor-deeplink/mcp/install?name=theskillvault&config=eyJ1cmwiOiJodHRwczovL3RoZXNraWxsdmF1bHQuYWkvbWNwIn0%3D","mcp_config":{"mcpServers":{"theskillvault":{"url":"https://theskillvault.ai/mcp"}}}},"bundles":[],"tested_on":[{"family":"chatgpt","name":"ChatGPT","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"claude","name":"Claude","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"gemini","name":"Gemini","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"grok","name":"Grok","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"llama","name":"Llama","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"deepseek","name":"DeepSeek","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"mistral","name":"Mistral","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"qwen","name":"Qwen","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"kimi","name":"Kimi K","outcome":null,"date":null,"source":null,"counts":false,"stale":false}],"proven_rule":{"threshold":5,"window_days":365,"computed_at":"2026-11-29T03:42:30.374Z"}}