Lenis

Lenis

www.lenis.dev

2

About this website

Lenis is an open-source smooth scroll library created by the team at darkroom.engineering, designed to deliver buttery-smooth scrolling experiences on the web with minimal performance overhead. The library is engineered to be under 4 kilobytes gzipped, making it one of the lightest smooth scroll solutions available. Unlike its predecessors, Lenis runs scroll calculations on the main thread rather than relying on CSS transforms that translate the entire page, which eliminates the performance budget loss and accessibility issues that plagued earlier approaches. This architecture preserves native browser APIs, including scrollTo, scrollIntoView, position sticky, and scroll snapping, ensuring that accessibility tools and browser features continue to function correctly. Lenis normalizes scrolling behavior across all input methods including trackpads, mouse wheels, touch screens, and keyboard navigation, giving developers control over scroll easing, duration, and sensitivity. The library supports both vertical and horizontal scrolling, can use any DOM element as the scroll container, and provides hooks for integrating with any animation library such as GSAP, Framer Motion, or Anime.js. High-profile deployments include the Grand Theft Auto VI website by Rockstar Games, Microsoft Design, Shopify Supply, MetaMask, and Getty. Lenis addresses three critical shortcomings of previous libraries like Locomotive Scroll and GSAP ScrollSmoother: the loss of performance budget from CSS transform scrolling, accessibility violations from virtual scroll positions, and large bundle sizes ranging from 12.1 to 24.34 kilobytes in competing solutions.

Tags & Categories

Statistics

2
Views
0
Clicks
0
Like
0
Dislike

Comments

Log In to post a comment

No comments yet. Be the first!