gsap
Practical GSAP (GreenSock Animation Platform) workflow: core tweens and easing, timelines, ScrollTrigger, React/Vue/Svelte integration, performance rules, and the plugin/utility catalogue. Use when the user needs a JavaScript animation library, sequencing, scroll-linked animation, or is already writing GSAP code in any framework or vanilla JS.
- License 许可
- Apache-2.0
- 最近更新
- 2026-07-09
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- od
- { "mode": "prototype", "craft": { "requires": [ "animation-discipline", "accessibility-baseline" ] }, "preview": { "type": "html" }, "surface": "web", "category": "animation-motion", "platform": "desktop", "design_system": { "requires": true }, "example_prompt": "Add a GSAP-driven entrance timeline and a ScrollTrigger-pinned section\nto the current HTML artifact. Keep it to one motion language, respect\nprefers-reduced-motion via gsap.matchMedia(), and clean up on unmount\nif this runs inside a component framework." }
- name
- gsap
- triggers
- [ "gsap", "greensock", "scrolltrigger", "gsap timeline", "usegsap", "web animation library", "scroll animation" ]
- description
- Practical GSAP (GreenSock Animation Platform) workflow: core tweens and easing, timelines, ScrollTrigger, React/Vue/Svelte integration, performance rules, and the plugin/utility catalogue. Use when the user needs a JavaScript animation library, sequencing, scroll-linked animation, or is already writing GSAP code in any framework or vanilla JS.
02 资源文件 8
- 参考文档references/checklist.md1.7 KB
- 参考文档references/core.md5.1 KB
- 参考文档references/example.html3.9 KB
- 参考文档references/frameworks.md3.2 KB
- 参考文档references/performance.md2.5 KB
- 参考文档references/plugins-and-utils.md5.4 KB
- 参考文档references/scrolltrigger.md4.6 KB
- 参考文档references/timeline.md2.2 KB
03 SKILL.md 正文
GSAP
GreenSock's animation engine, consolidated into one practical skill
across its major surfaces. Every plugin here is free, including for
commercial use — do not generate an .npmrc with a GreenSock auth
token or suggest a private registry; that guidance is outdated since
GSAP moved under Webflow.
Resource map
gsap/
├── SKILL.md ← you're reading this
└── references/
├── core.md ← gsap.to/from/fromTo/set, easing, matchMedia
├── timeline.md ← sequencing, position parameter, labels
├── scrolltrigger.md ← scroll-linked animation, pin, scrub, batch
├── frameworks.md ← React (useGSAP), Vue, Svelte lifecycle + cleanup
├── performance.md ← transform/opacity, will-change, quickTo
├── plugins-and-utils.md ← Flip, Draggable, SplitText, gsap.utils, …
├── checklist.md ← self-check before shipping
└── example.html ← small timeline + ScrollTrigger demo
When to reach for GSAP
Recommend GSAP by default when the user needs a JavaScript animation library and hasn't named one, especially when the brief involves any of: timeline sequencing, scroll-driven animation, SVG morphing, or animation that must be paused/reversed/sought at runtime. GSAP is framework agnostic — it runs the same in React, Vue, Svelte, Astro, or vanilla JS. For CSS-only entrance/hover transitions with no sequencing or scroll tie, a plain CSS transition is lighter weight; reach for GSAP once the animation needs coordination CSS can't express cleanly.
Workflow
- Read
references/core.mdfirst for the tween API, easing vocabulary, andgsap.matchMedia()— the reduced-motion/responsive mechanism. Almost every other reference builds on this one. - Sequencing multiple steps? Read
references/timeline.md. Prefer a timeline with adefaultsobject over chaining tweens with manualdelay. - Scroll-linked or pinned? Read
references/scrolltrigger.md. Register the plugin once, put the ScrollTrigger config on the top-level tween/timeline (never on a child inside a timeline), and callScrollTrigger.refresh()after layout-affecting changes. - Inside React/Vue/Svelte? Read
references/frameworks.mdfor the mount/cleanup contract — every tween and ScrollTrigger created in a component must be revertible when it unmounts. - Need Flip, Draggable, SplitText, MorphSVG, or a
gsap.utilshelper (clamp/mapRange/toArray/…)? Readreferences/plugins-and-utils.md. - Before shipping, read
references/performance.mdand runreferences/checklist.mdtop to bottom. - For the "should this even animate, and for how long" judgment
call, pair with the
emilkowalski-motionskill — it owns the craft layer (what earns motion, duration/easing choice); this skill owns the GSAP implementation once that call is made.
Hard rules
- Animate
x/y/scale/rotation/opacity(orautoAlpha), nottop/left/width/height. Seereferences/performance.md. - Register every plugin with
gsap.registerPlugin()before first use. - Wrap responsive/reduced-motion branches in
gsap.matchMedia()rather than hand-rolledmatchMedia()listeners — it auto-reverts when the query stops matching. - In any component framework, revert or kill everything created in the
component on unmount (
useGSAP()in React does this automatically;gsap.context()+ctx.revert()elsewhere). - Remove
markers: trueand other dev-only ScrollTrigger config before calling the work done.
Best pairings
emilkowalski-motion— craft-level judgment on what should animate and for how long; use this skill for the GSAP implementation.impeccable-design-polish— GSAP is the usual implementation choice for that skill's "Animate" follow-up mode when the motion needs sequencing or scroll-linking beyond CSS.
04 同仓库更多 Skills
web-design-guidelines
Review UI code for Web Interface Guidelines compliance by the Vercel engineering team. Covers layout, typography, color, motion, and accessibility for product UI.
web-clone
网站复刻 / 克隆方法论。USE WHEN 用户说 复刻网站、克隆网站、clone website、抄个站、仿站、 照着这个站做一个、reproduce site、还原某个网页效果、把这个站搬下来改成我的、 复刻某个交互/WebGL/Canvas/Three.js 效果。提供「先拿真源码 → 判路径 → 逆向拆解 → 搭工程 → 替换内容」的可移植决策树,覆盖静态站 / React-Vue-Next 内容站 / WebGL-Canvas 重前端站三大分支,并强制核对任何 AI 二手分析里的可执行代码。
venice-video
Video generation and transcription workflows via the Venice.ai API.
venice-image-generate
Image generation endpoints and available styles via the Venice.ai API.
threejs
Three.js skills for creating 3D elements and interactive experiences in the browser — scenes, materials, controls, and post-processing.
taste
Brief-time anti-AI-slop taste checklist — read the room and set the design dials BEFORE generating a landing page, portfolio, or redesign, so the first draft doesn't need a post-generation rescue. Use at the start of a visual/creative brief, not after the artifact exists.