Lenis
Smooth-scrolling library · Free
A library for smooth scrolling and synchronizing DOM/WebGL animations. Useful for scroll scenes and integration with GSAP.

What you can use for free
The library is free; no subscription is needed.
Use cases
- Smooth landing-page scrolling
- Synchronizing WebGL, DOM, and GSAP scroll animations
Example workflow
A possible workflow; this is not a report of hands-on testing.
Example workflow with Lenis: Smooth landing-page scrolling.
Before you start
- A page with long content and one area that needs controlled scrolling.
- Existing scroll handlers and navigation paths to page sections.
- From the tech stack mentioned on this page, choose an option that suits your project: WebGL; check version compatibility in the documentation.
Steps
- For the task “Smooth landing-page scrolling”: test the page with normal scrolling, then add the chosen mechanism in one place.
- Tie the effect to the section's actual position rather than assuming a fixed viewport height.
- Test resizing, media loading, and returning to the page; coordinate the behavior with other effects.
Check your result
- Mouse wheel, touch, keyboard, and section links produce the expected result.
- Long pages remain readable; reduced motion and less powerful devices do not block navigation.
Choosing Lenis
Smooth landing-page scrolling
Choose this when
- Smooth landing-page scrolling
- Synchronizing WebGL, DOM, and GSAP scroll animations
Requirements
- Include the recommended CSS and choose autoRaf or your own raf; with GSAP, convert ticker time to milliseconds.
Things to consider
- Access terms: The library is free; no subscription is needed.
- Terms of use: MIT.
- The GSAP ticker supplies seconds and lenis.raf accepts milliseconds; incorrect units break synchronization.
Frequently asked questions
What can you use for free in Lenis?
The library is free; no subscription is needed.
What are the access terms for Lenis?
The library is free; no subscription is needed.
What terms of use matter for Lenis?
MIT.
Which environment can you use Lenis in?
Tech stack: JavaScript, WebGL / WebGPU.
How do you get started with Lenis?
For the task “Smooth landing-page scrolling”: test the page with normal scrolling, then add the chosen mechanism in one place. Tie the effect to the section's actual position rather than assuming a fixed viewport height. Test resizing, media loading, and returning to the page; coordinate the behavior with other effects.
Why does the Lenis/GSAP integration example multiply time by 1000?
The README connects the GSAP ticker to lenis.raf(time * 1000): the ticker uses seconds, while Lenis uses milliseconds. The scroll event is also connected to ScrollTrigger.update. Choose a consistent update path and test movement while scrolling.
Related tasks and approaches
Tech stack
- JavaScript
- WebGL / WebGPU
License
MIT.
MIT — permissive license
You can use, modify, distribute, and sell the code, including in a closed-source commercial product. When sharing copies or substantial portions of the code, retain the license text and copyright notice. You do not need to open-source your entire project; the author provides no warranties.
License termsTechnologies and topics
- Lenis
- WebGL