One clock for smooth scrolling
A practical way to run Lenis, GSAP, and Framer Motion on the same page without overlapping responsibilities.
- Animation
- Front end

A page can use a smooth scroll library and still leave most animation decisions local to the component. On this site, Lenis handles wheel input, ScrollTrigger handles section entrances, and Framer Motion looks after the navigation indicator and project image hover.
Give each library one job
| Library | Owns | Trigger |
|---|---|---|
| Lenis | Scroll position | Wheel input |
| GSAP | Section reveal | Scroll position |
| Framer Motion | Page and component feedback | Route or interaction |
The boundary matters more than the library choice. For example, an image can scale on hover inside a grid item while the parent grid item animates into view. Each layer has its own transform.
Drive Lenis with the GSAP ticker
const update = (seconds: number) => lenis.raf(seconds * 1000);
lenis.on("scroll", ScrollTrigger.update);
gsap.ticker.add(update);
gsap.ticker.lagSmoothing(0);
function cleanup() {
gsap.ticker.remove(update);
lenis.destroy();
}Lenis takes milliseconds. GSAP passes seconds to its ticker callback. Keeping the conversion beside the callback makes the integration easier to check.
A scroll effect should make the content easier to follow. A short fade and a small offset are usually enough.
Check the edges
- Keep touch scrolling native so a swipe behaves normally.
- Treat reduced motion as a separate path that keeps the content visible.
- Save and restore scroll positions on history navigation.
- Clean up page triggers before creating triggers for the incoming route.
See the Lenis integration guide for the underlying ticker setup.