Expose ScrollTrigger config options (e.g. fastScrollEnd, preventOverlaps) beyond tween vars

GSAP’s ScrollTrigger supports useful config properties like fastScrollEnd and preventOverlaps, which help avoid animations lagging behind or overlapping when users scroll quickly.
Currently, the only place to inject custom GSAP properties in the Animation panel is the “Vars (advanced)” field on individual Animation entries - but that field writes into the tween’s vars object, not the ScrollTrigger config object.

What happens now:
If I add { fastScrollEnd: true } to the Animation’s “Vars (advanced)” field, the generated code looks like this:

ScrollTrigger.batch(".my-selector", {
  start: "top 90%",
  end: "bottom top",
  onEnter: (elements) => {
    gsap.to(elements, {
      duration: 0.3,
      fastScrollEnd: true, // ← lands here, has no effect
      y: "0px",
      autoAlpha: 1,
      ease: "expo.out"
    });
  }
});

fastScrollEnd ends up inside the gsap.to() vars, where it’s meaningless - per the GSAP docs, it needs to be inside the ScrollTrigger.batch() config object instead:

ScrollTrigger.batch(".my-selector", {
  start: "top 90%",
  end: "bottom top",
  fastScrollEnd: true, // ← needs to be here (default threshold 2500px/s per GSAP docs)
  onEnter: (elements) => { ... }
});

Request:
Could you add a “Custom ScrollTrigger Vars (advanced)” field at the Timeline level (next to Start/End/Toggle Actions/Batch in the SCROLL section), separate from the per-animation tween vars? This would let us inject properties like fastScrollEnd or preventOverlaps directly into the ScrollTrigger config, without needing to write a fully custom script outside the panel.

This would be useful for anyone using non-scrubbed ScrollTrigger animations (including Batch mode), where fast scrolling can leave animations visibly lagging behind.

Thanks for considering it!

Hi,

you’re right - that field writes into the tween vars, and there is currently no field that writes into the ScrollTrigger config. We’ll take it up, but I can’t name a point in time for when we’ll build it yet.

Until then, a footer snippet loaded after our GSAP files covers all your scroll timelines at once:

ScrollTrigger.defaults({ fastScrollEnd: true, preventOverlaps: true });

Best,
Daniele

1 Like