scroll-animation
使用 GSAP、ScrollTrigger、SplitText 和 Lenis 平滑滚动构建滚动驱动动画——包括显现、固定区块、横向滚动、视差、擦洗时间线、文字效果——适用于原生 JS、React、Next.js、Vue/Nuxt 或 Astro,并包含正确的初始化、清理和响应式回退。当用户提到 GSAP、ScrollTrigger、Lenis、平滑滚动、视差、固定、擦洗、“animasi saat scroll”、横向滚动或滚动叙事时使用。
机器翻译查看英文原文
Build scroll-driven animations with GSAP, ScrollTrigger, SplitText and Lenis smooth scroll — reveals, pinned sections, horizontal scroll, parallax, scrubbed timelines, text effects — in vanilla JS, React, Next.js, Vue/Nuxt, or Astro, with correct setup, cleanup and responsive fallbacks. Use whenever the user mentions GSAP, ScrollTrigger, Lenis, smooth scroll, parallax, pin, scrub, "animasi saat scroll", horizontal scroll, or scroll storytelling.
适用对象:设计与内容创作。自动收录 · 待核查。
原作者说明节选
从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。
查看英文原文
原文涵盖的主题
- Scroll Animation (GSAP + ScrollTrigger + Lenis)
- 1. Install
- 2. One setup module
- 3. Framework integration
- 4. ScrollTrigger rules that prevent 90% of bugs
- 5. Responsive & reduced motion
- 6. Performance
- 7. Verify
If GreenSock's official skills (gsap-core, gsap-scrolltrigger, gsap-react, gsap-plugins) are installed, use them for API details; this skill covers project setup, integration and the mistakes that break real sites. All GSAP plugins (ScrollTrigger, SplitText, Flip, ScrollSmoother, MorphSVG, DrawSVG…) ship in the public gsap package and are free for commercial use. Import from gsap/ and call gsap.registerPlugin(...) once. Create lib/motion/setup.(js|ts) (or animations/) that is imported once on the client: Use either Lenis or GSAP ScrollSmoother, not both. React / Next.js (App Router) — files using GSAP need "use client". Always use useGSAP (auto-cleanup, no double-run in Strict Mode): Event handlers that create animations: wrap with contextSafe from useGSAP. Smooth scroll provider: a client component in the root layout that calls initSmoothScroll() in an effect (or ReactLenis from lenis/react with autoRaf: false and the GSAP ticker). Route change in Next.js: scroll to top (lenis.scrollTo(0, { immediate: true })) and ScrollTrigger.refresh() after the new page mounts. Vue / Nuxt — create in onMounted inside gsap.context(() => {…}, rootEl), call ctx.revert() in onUnmounted. Nuxt: clien
这里只展示节选,请以完整原文和当前要求为准。
- 来源仓库
- KILN-skills/kiln
- 源文件
- skills/scroll-animation/SKILL.md
- 固定版本
- 555d7ea59d05910b4ef6fb39780da5f906be832b
来源与内容状态
本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。
原作者:KILN-skills/kiln · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-10T04:00:15.444Z。
分类由名称、说明与路径规则生成,分类不代表已核实适配。
许可与权利归属
MIT。第三方内容及版权归原作者,使用条件以原文为准。
许可原文 ↗本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。
限制与注意事项
- 元数据收录不代表本站已经安装、适配、实测或进行安全审查。