
Why Lenis Broke My Scroll-Snap (And How I Fixed It)
A common frontend gotcha: Lenis smooth scroll library and CSS scroll-snap are incompatible. Here’s why they fight and how to choose between them.

A common frontend gotcha: Lenis smooth scroll library and CSS scroll-snap are incompatible. Here’s why they fight and how to choose between them.
Lenis smooth scroll library is INCOMPATIBLE with CSS scroll-snap. They fight for scroll control.
Wedding invitation site had both Lenis (for smooth parallax scrolling) and CSS scroll-snap (for section-by-section navigation). Neither worked properly.
Librarian agent research: “CRITICAL: Lenis and CSS scroll-snap are INCOMPATIBLE - Lenis hijacks native scrolling” Solution: “Remove Lenis, use CSS scroll-snap + native smooth scroll for better mobile performance”
Lenis works by:
requestAnimationFrameCSS scroll-snap expects:
When combined:
Removed Lenis entirely:
// Before (Layout.astro)
import Lenis from 'lenis';
const lenis = new Lenis({ ... });
lenis.on('scroll', ScrollTrigger.update);
// After
// Just GSAP ScrollTrigger, no Lenis
gsap.registerPlugin(ScrollTrigger);
Added native smooth scroll:
Read more