All posts

  • Webflow
  • GSAP
  • Animation
  • Performance

GSAP in Webflow: 5 Animations That Improve a Website (and 3 That Hurt It)

GSAP animation timeline over a Webflow page, with scroll-triggered elements highlighted

Most websites don’t have an animation problem. They have a purpose problem.

Motion gets added because it looks good in a Dribbble shot, not because it helps someone understand the page. The result: sites that feel busy, load slowly, and make people wait for text to fade in before they can read it.

I use GSAP on almost every Webflow build I ship. Here’s what I’ve learned: good animation guides attention, explains structure and makes a brand feel considered. Bad animation gets in the way.

Short version: animate to guide, not to decorate. Use transforms and opacity, respect reduced motion, and never hide your main content behind an intro.

Below are the five animations I reach for most, with the code I actually use, and the three I avoid.

Setting up GSAP in Webflow

Since Webflow acquired GreenSock, GSAP is free to use, including plugins like ScrollTrigger and SplitText that used to be paid. You can load it through Webflow’s built-in GSAP option, or add it yourself in Site settings → Custom code → Footer:

<script src="https://cdn.jsdelivr.net/npm/gsap@3/dist/gsap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gsap@3/dist/ScrollTrigger.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gsap@3/dist/SplitText.min.js"></script>
<script>
  gsap.registerPlugin(ScrollTrigger, SplitText);
</script>

One habit that keeps Webflow projects clean: target custom attributes, not class names. In the Designer, add an attribute like data-reveal to an element. Designers can rename classes freely without breaking your animations.

I wrote about my AI + MCP workflow for Webflow here.

1. Scroll reveals that don’t make people wait

The most common animation on the web, and the most commonly overdone. A good reveal is short, subtle and happens once.

// CSS (in Webflow head): [data-reveal] { visibility: hidden; }
ScrollTrigger.batch("[data-reveal]", {
  start: "top 85%",
  once: true,
  onEnter: (els) =>
    gsap.fromTo(els,
      { y: 40, autoAlpha: 0 },
      { y: 0, autoAlpha: 1, duration: 0.8, ease: "power3.out", stagger: 0.08 }
    ),
});
Demo — Scroll reveal

Why it works:

  • batch groups elements that enter together, so cards in a grid stagger naturally instead of firing one by one.
  • once: true means people scrolling back up don’t watch it all again.
  • Hiding with visibility in CSS prevents the “flash” of content before GSAP loads.

Where I use it: cards, feature lists, testimonials. Where I don’t: the hero heading and main text. Those should be visible the moment the page loads.

2. Split-text headings that set the tone

Headings that rise in line by line instantly make a site feel designed. SplitText now handles masking for you, so there’s no extra wrapper markup.

document.querySelectorAll("[data-split]").forEach((heading) => {
  const split = SplitText.create(heading, { type: "lines", mask: "lines" });

  gsap.from(split.lines, {
    yPercent: 100,
    duration: 0.9,
    ease: "expo.out",
    stagger: 0.1,
    scrollTrigger: { trigger: heading, start: "top 80%", once: true },
  });
});
Demo — Split text

Motion thatdoes a job.

Tip: split by lines, not characters. Character-by-character animation looks impressive once and tiring by the third heading. Lines keep it readable and fast.

3. Counters that make numbers land

“60+ websites” reads very differently when it counts up as it scrolls into view. It’s a tiny detail that makes stats feel earned.

document.querySelectorAll("[data-count]").forEach((el) => {
  const target = Number(el.dataset.count);
  const counter = { value: 0 };

  gsap.to(counter, {
    value: target,
    duration: 1.6,
    ease: "power2.out",
    snap: { value: 1 },
    onUpdate: () => (el.textContent = counter.value + "+"),
    scrollTrigger: { trigger: el, start: "top 85%", once: true },
  });
});
Demo — Counter
60+Websites shipped
10+Industries
04+Years in practice

In Webflow, add data-count="60" to the text element and type the final number as its content, so it still reads correctly if JavaScript fails.

4. Pinned horizontal sections for storytelling

When content has a natural order (a timeline, a process, a journey), pinning the section and scrolling it sideways makes people follow it instead of skimming. I use this for the journey section on my own site.

const section = document.querySelector("[data-horizontal]");
const track = section.querySelector("[data-track]");

gsap.to(track, {
  x: () => -(track.scrollWidth - window.innerWidth),
  ease: "none",
  scrollTrigger: {
    trigger: section,
    pin: true,
    scrub: 1,
    end: () => "+=" + (track.scrollWidth - window.innerWidth),
    invalidateOnRefresh: true,
  },
});
Demo — Horizontal story
2022First Webflow build
2023CMS and templates
2024Motion and GSAP
2025Design systems
2026AI-assisted builds
Auto-play demo · no scroll pin

For this in-article demo, the track auto-plays instead of pinning the page, so you can keep your place and stay in control of the scroll.

Use it once per page, at most. A pinned section is a strong moment. Three of them is a scroll trap.

5. Magnetic buttons for the actions that matter

A button that gently follows the cursor draws the eye to your main call to action without shouting. quickTo makes it smooth and cheap.

document.querySelectorAll("[data-magnetic]").forEach((btn) => {
  const xTo = gsap.quickTo(btn, "x", { duration: 0.4, ease: "power3.out" });
  const yTo = gsap.quickTo(btn, "y", { duration: 0.4, ease: "power3.out" });

  btn.addEventListener("mousemove", (e) => {
    const r = btn.getBoundingClientRect();
    xTo((e.clientX - r.left - r.width / 2) * 0.3);
    yTo((e.clientY - r.top - r.height / 2) * 0.3);
  });
  btn.addEventListener("mouseleave", () => { xTo(0); yTo(0); });
});
Demo — Magnetic button
Hover on desktop to try

Keep it to one or two key buttons (Start a project, Book a call). If every button is magnetic, none of them stand out.

3 animations that hurt your website

1. Hiding the main content behind an intro

Long preloaders, hero text that fades in after two seconds, a headline that waits for a 3D scene to load. Visitors decide in seconds whether to stay, and Google measures how fast your main content appears. Your hero heading and key message should be visible immediately. Animate around them, not in front of them.

2. Animating layout properties

Animating width, height, top, left or margin forces the browser to recalculate the layout every frame, and on a mid-range phone that means stutter. Stick to transform (x, y, scale, rotate) and opacity. They’re handled by the GPU and stay smooth.

3. Scroll-jacking for no reason

Taking over the user’s scroll (snapping, slowing it down, forcing sections) can feel cinematic on a portfolio piece. On a business site, where people want to find the pricing or contact page, it’s frustrating. Smooth scrolling is fine; removing control is not.

Two rules I apply to every project

Respect reduced motion. Some people get dizzy or nauseous from movement and turn it off in their system settings. GSAP’s matchMedia makes this easy, and it handles mobile versions too:

const mm = gsap.matchMedia();

mm.add("(prefers-reduced-motion: no-preference)", () => {
  // all the animations above go here
});

mm.add("(prefers-reduced-motion: reduce)", () => {
  gsap.set("[data-reveal]", { autoAlpha: 1 }); // just show everything
});

Check it on a real phone. Animations that feel smooth on a MacBook can stutter on a three-year-old Android. If something drops frames on mobile, simplify it or turn it off there.

Is GSAP worth it over Webflow Interactions?

For simple fades and hovers, Webflow’s built-in Interactions are often enough, and anyone on the team can edit them. I switch to GSAP when I need:

  • precise timing and sequencing across many elements
  • split text, counters and pinned scroll sections
  • reusable code I can drop into the next project
  • control over performance, like killing animations off-screen or simplifying them on mobile

The goal is never “more animation.” It’s motion that does a job: guiding the eye, explaining the structure, and making the brand feel considered.

Need a site that moves like this?

I design and build Webflow sites with motion that serves the content, not the other way round. Book a 30-min call or see my retainer plans if you need a developer on call.

  • Webflow
  • GSAP
  • Animation
  • Performance