↓ scroll down

Lenis

Open-source smooth scroll library by Darkroom. Replaces native scroll with a lerp-based virtual scroller. Lightweight, no custom scrollbar required.

GSAP integration

Lenis is driven by gsap.ticker via lenis.raf(time * 1000). Its scroll events update ScrollTrigger so all trigger positions stay in sync with the virtual scroll.

vs. DIY lerp

Unlike a hand-rolled position: fixed wrapper, Lenis intercepts native scroll directly — accessibility, keyboard navigation, and scroll restoration all still work.

parallax

Stop / Start

lenis.stop() and lenis.start() pause and resume smooth scroll — useful when a modal or overlay is open.

Scroll To

lenis.scrollTo(target) scrolls to a selector, element, or offset with the same smooth inertia — a drop-in for scrollIntoView().

Easing

Lenis accepts a custom easing function in its constructor. Default is an expo ease. Pass lerp: 0.1 to control smoothness directly.