Smooth scrolling and scroll-driven animation are two libraries solving adjacent problems, and both ship with the same assumption: that they own the animation frame. Lenis runs its own requestAnimationFrame to interpolate scroll position. ScrollTrigger runs its own to read it. Install them the way their READMEs suggest and you have two loops, unordered relative to each other.
The failure is subtle enough to ship. Most frames, the order happens to be right. On the frames where it is not, ScrollTrigger reads the position Lenis wrote last frame, and every scrubbed animation on the page is one frame stale. You see it as a pinned section that lags a few pixels behind the cursor during fast scroll, and you spend an afternoon adjusting easing curves that were never the problem.
Make the order explicit
The fix is to stop having two loops. GSAP already runs a ticker; drive Lenis from that instead of from its own RAF, and update ScrollTrigger from the Lenis scroll callback rather than letting it poll. Now there is exactly one clock, and the order within a frame is written down rather than inferred.
const lenis = new Lenis({ /* … */ })
// One clock. GSAP's ticker drives Lenis, not the other way around.
gsap.ticker.add((time) => lenis.raf(time * 1000))
gsap.ticker.lagSmoothing(0)
// ScrollTrigger reads position from the scroll event, never by polling —
// so it cannot observe a value Lenis has not finished writing.
lenis.on('scroll', ScrollTrigger.update)The part that is easy to miss
One loop fixes ordering within a frame. It does not fix stale layout across a route change. Lenis caches the document height, so navigating from a long page to a short one leaves it clamping scroll to the previous limit — the page simply refuses to reach its own bottom. Anything that changes document height has to call resize() and let ScrollTrigger re-measure before scroll position is touched, which is why route transitions here own scroll placement rather than leaving it to individual pages.
The general lesson is not about these two libraries. Any two things that both want the frame need one of them to be told, explicitly, that it is not in charge.