Learn timeline setup, scroll-trigger tricks and code-splitting so your motion design scores 90+ on Lighthouse—even on mobile.
Published July 2025 • 10 min read
Webflow’s native interactions panel covers 80 percent of everyday motion work, but once you crave staggered SVG morphs or physics-based easings, you reach for the GreenSock Animation Platform. In 2025, GSAP 4.0 syncs perfectly with Webflow’s exported code, offering tree-shakable modules and ScrollTrigger baked right in. The downside? A single mistimed timeline can tank your CLS and leave Lighthouse fuming.
Add gsap.min.js
and ScrollTrigger.min.js
via Site Settings → Custom Code → Head, but only on pages that need it. Use <script type="module" defer>
so parsing waits until the DOM is ready. File size after Brotli: a slim 65 kB.
Create Interaction placeholders to reserve DOM space. This prevents layout shifts once GSAP kicks in. Give each animated element a class like .gs-hero-heading
so scripts stay decoupled from the Designer’s auto-generated IDs.
top/left
—stick to transform: translate3d()
.requestAnimationFrame
.gsap.ticker
to prevent layout trashing.If the hero animation weighs 2 MB of Lottie JSON, fire it only after window.requestIdleCallback
or when the section reaches 30 % viewport
. Combine with Webflow’s lazy-load images toggle to keep LCP under 2.5 s.
Using Vite or Webpack? Import GSAP as a dynamic chunk: if(pageNeedsMotion) import('gsap')
. This keeps pages like /blog/ snappy while your showcase home page gets the fancy scroll-jacking.
Run gsap.set("body", {outline: "2px solid red"})
to visualise paint areas, then kill once optimised. The new 2025 Frame Heatmap plugin highlights jank frames right in Chrome DevTools.
Case study: a SaaS landing with five ScrollTrigger scenes and 14 SVG morphs.
Metric | Before | After tuning |
---|---|---|
LCP (mobile) | 4.1 s | 2.3 s |
CLS | 0.17 | 0.02 |
Total Blocking Time | 350 ms | 80 ms |
GSAP doesn’t have to be your performance nemesis. By loading modules conditionally, sticking to GPU-friendly transforms, and pairing with Webflow’s optimized assets pipeline, you can deliver cinematic motion while still nailing Core Web Vitals.
Lorem ipsum dolor sit amet consectetur mi urna tellus dignissim duis at in tempor mauris morbi fermentum dolor lobortis aliquam maecenas.