Scroll-linked animation with ScrollTrigger
Ask Claude for pinned sections, scrubbing or sideways scroll and it builds them with GSAP ScrollTrigger.
See it work
You give it
Use gsap-scrolltrigger. On our Kansas City barbecue sauce site, the "How it's made" section should pin and slide 4 panels (Smoke, Simmer, Bottle, Ship) sideways as you scroll down. It stutters, the panels don't line up with the scroll, and the captions fade in at random times. Plain HTML, GSAP 3 from a CDN. My code:
const tl = gsap.timeline();
tl.to(".panels", { xPercent: -300, scrollTrigger: { trigger: ".how", pin: true, scrub: true, end: "+=3000", markers: true } });
gsap.utils.toArray(".panel p").forEach(p => {
gsap.from(p, { opacity: 0, scrollTrigger: { trigger: p, start: "left center" } });
});
You get back
All three symptoms come from that snippet, and each one has a known cause. I can only see the JavaScript you pasted, not your HTML or CSS, so I've written the CSS this needs as well; check it against yours.
What's wrong
No. · In your code · What it causes · Fix
1 · The ScrollTrigger sits on a tween inside tl · ScrollTriggers belong on a timeline or a top-level tween, never on a child tween inside a timeline. Here the timeline and the ScrollTrigger both try to drive the same tween, a likely source of the stutter. · Drop the timeline. Put the ScrollTrigger on one top-level tween.
2 · No ease on the slide · Without one, GSAP uses its default ease, which isn't linear. For a sideways scroll the ease must be "none", or the panels' position won't match how far you've scrolled. That's the "don't line up". · ease: "none"
3 · Captions use start: "left center" with no containerAnimation · Without it, ScrollTrigger measures each caption against your normal vertical scroll, where the panels never move sideways. So they fire at points that have nothing to do with when each panel arrives. That's the "random". · Give the caption triggers containerAnimation: scrollTween.
4 · xPercent: -300 and end: "+=3000" · xPercent is a percentage of .panels' own width. If .panels is as wide as all four panels together, -300% sends it three times its own width, far past Ship. And a fixed 3,000 px makes the slide a different speed on every screen width. · Move it by the real distance in pixels, and make the scroll length the same distance.
First part of a run in Claude (Opus 5.5), Nov 2026
What it does
- Starts animations as sections scroll in.
- Pins a section while its content moves.
- Cleans up and refreshes triggers properly.
What's inside
gsap-scrolltrigger/CREDITS.mdgsap-scrolltrigger/LICENSEgsap-scrolltrigger/SKILL.md
How you use it
- Get the skill: one zip file. It comes with every paid plan.
- Add it to Claude. In Claude, open Customize (Plugins on newer screens), then Skills. Press +, then Create skill, then Upload a skill. In Claude Code, unzip it into ~/.claude/skills/ instead.
- Start a new chat and tell Claude what you need, the way the example above does. The skill takes it from there.
- Then ask for the work. Claude reaches for the skill when it fits, or name it: "use gsap-scrolltrigger".
Get this skill with a paid plan
The download comes with every paid plan, along with all 204 Claude skills and the rest of the AI toolkit. “Sites that don't look templated” in this folder is free, so you can try one first.