Skip to content
Agents tracked: 502 Releases (7d): 613 Agent status: 4 with issuesSince last limit reset: Claude 7d · Codex 5d For AI agents: Markdown Updated Nov 18, 2026

Lenis

by darkroom.engineering

Lightweight smooth-scroll library often paired with GSAP ScrollTrigger and WebGL scroll effects.

Web animation examples and effects Code libraryOpen sourceminimal

GitHub repoWebsite
Scroll position over two seconds after one jump of 3000 pixels, as an instant step without smoothing, and with Lenis at duration 1.2 s, lerp 0.1 and lerp 0.03.
Made by AgentGid with lenis 1.3.27 (npm, dist/lenis.min.js). MIT license; the chart is drawn by our own code from values Lenis returned.

2. Commercial use: raw.githubusercontent.com

“to use, copy, modify, merge, publish, distribute, sublicense, and/or sell”

MIT allows use, change and sale in paid products.

raw.githubusercontent.com

License checked Nov 5, 2026 against 1 official page. Tap a verdict to see its source. How we checked Report an error

Lenis: smooth page scrolling for websites

Lenis is a small free script that makes a web page glide when people scroll, instead of jumping in steps. It keeps the browser's own scrolling underneath, so sticky headers, links to page sections and screen readers keep working. Design studios use it with scroll animations and 3D scenes.

Where you can use it

A smoother feel on a landing page

Make wheel and trackpad scrolling glide on a portfolio or product page, added with a few lines and no build step.

Scroll animations that stay in sync

When pictures and text animate as you scroll, Lenis and the animation library move together on one clock, so effects do not lag behind the page.

Smooth jumps to page sections

Clicking Pricing or Contact in the menu glides to that part of the page, with room left for a fixed header.

3D and WebGL scenes tied to scroll

Keep a 3D scene or a moving background in step with the page as people scroll through a story site.

Smooth scrolling on a Framer site

Add the same smooth feel to a site made in Framer with the official plugin, without writing code.

Horizontal gallery sections Idea

Let a row of project images or a timeline glide sideways, for a gallery or a case study page.

As reported by darkroom.engineering: The whole library is a few KB with zero runtime dependencies; Under 5kb.

Lenis popularity

59 / 100
Gid Score, same scale as developer tools
17,316
GitHub stars
2.7M
npm downloads, last 7 days
+30.4% in 4 weeks
38
AI-agent projects using it, from our repo scan of 4,817
Lenis: downloads per weeknpm, lenis 2,747,298
Lenis: GitHub starsdarkroomengineering/lenis 17,316

Downloads from api.npmjs.org, stars from GitHub, checked Nov 17, 2026. How the Gid Score is calculated

How to start

Tell your AI assistant

“Add lenis 1.3.27 with its recommended CSS, start it with autoRaf true and anchors true, mark the modal and the dropdown with data-lenis-prevent, and keep the default respect for reduced motion.”

Or install it yourself.

npm i lenis
Show codeStep 1 or Step 2

Start Lenis with its own animation loop turned on.

import Lenis from 'lenis'
import 'lenis/dist/lenis.css'

const lenis = new Lenis({
  autoRaf: true,
});

Mistakes to avoid

new Lenis() with no autoRaf and no animation loop
new Lenis({ autoRaf: true }), or call lenis.raf(time) in your own requestAnimationFrame or GSAP ticker loop

Lenis only moves the page when raf runs every frame; otherwise scrolling looks dead.

Leaving out lenis.css
import 'lenis/dist/lenis.css' or link dist/lenis.css from the same version

The CSS handles stopped state, nested scroll areas and iframes; the troubleshooting list asks for it.

smoothTouch: true (from older guides and the site llms.txt)
syncTouch: true, only when you need touch scroll synced

The current settings list has syncTouch, not smoothTouch, and the limits list warns about it on older iOS.

CSS scroll-snap-type on sections together with Lenis
Use the lenis/snap add-on for snapping

Lenis does not support CSS scroll-snap.

<script src="https://unpkg.com/lenis"></script> (no version, as in the site llms.txt)
Pin the version, e.g. https://unpkg.com/lenis@1.3.27/dist/lenis.min.js, or install from npm

An unversioned link loads whatever is newest and can change behavior without warning.

License

MIT license. Free to use in personal and paid sites, with no visible credit. Keep the copyright and license notice with copies of the code.

Commercial use
Yes

“to use, copy, modify, merge, publish, distribute, sublicense, and/or sell” raw.githubusercontent.com

Credit
Not needed

“The above copyright notice and this permission notice shall be included in all” raw.githubusercontent.com

Inside your app or game
Can ship inside your app

“to use, copy, modify, merge, publish, distribute, sublicense, and/or sell” raw.githubusercontent.com

Pass the files on to your users
Allowed

“to use, copy, modify, merge, publish, distribute, sublicense, and/or sell” raw.githubusercontent.com

AI training
Not stated
Bots and bulk downloads
Not stated

AllowedWith conditionsNot allowedNot stated or not checked yet

Is Lenis free for commercial use? The full answer Not legal advice. Check the license page before you ship.

For your agent

License rules tell your agent what it may do with Lenis. Paste them into your prompt or AGENTS.md.

License rules
- Lenis (Web animation examples and effects, UI animation (Lottie, Rive)). Lightweight smooth-scroll library often paired with GSAP ScrollTrigger and WebGL scroll effects. Price: free; commercial use OK; no credit needed. Style: minimal.
  Connect: npm lenis.
  Get files: npm install lenis, create new Lenis() and drive it with requestAnimationFrame or GSAP's ticker (js, css).
  Rule: Keep the MIT notice if you redistribute the code.
  Rule: Respect prefers-reduced-motion.
  License: https://raw.githubusercontent.com/darkroomengineering/lenis/main/LICENSE (checked 2026-11-05; details: https://agentgid.com/assets/lenis/)
Can an agent use it by itself?
Yes.

Agent installs a package or loads it from a CDN.

Install
npm install lenis
How an agent gets files
npm install lenis, create new Lenis() and drive it with requestAnimationFrame or GSAP's ticker.

Formats: js, css

API, key or account
Not needed. Everything runs on your side.
MCP server
None found
Credit line, if you want one
Smooth scroll: Lenis by darkroom.engineering (MIT)
This card for machines

Alternatives

Lenis This page

Free Commercial OK npm

GSAP (GreenSock)

Pick GSAP when you need the scroll animations themselves (pinning, scrubbing, text effects); it pairs with Lenis rather than replacing it.

Free Commercial OK npm

AOS (Animate On Scroll)

Pick AOS when you only want elements to fade or slide in as they appear, set with data attributes, without changing how the page scrolls.

Free Commercial OK npm

Animate.css

Pick Animate.css for ready entrance and attention animations added with one class name.

Free With conditions npm

three.js examples

Hundreds of official three.js WebGL/WebGPU examples (shaders, particles, post-processing, loaders) with full source in the repo's examples folder.

Free Commercial OK npm

React Three Fiber examples

Gallery of React Three Fiber scenes (shaders, portals, caustics, scroll, physics, glass) linked to runnable sandboxes with source.

Free Commercial OK npm

All web animation examples and effects

Questions

Does smooth scrolling break sticky headers or links to sections?

No. Lenis wraps the browser's own scroll, so sticky elements and anchor links keep working; turn on anchors for smooth jumps.

Does it work with React or Vue?

Yes. There are packages lenis/react and lenis/vue, plus a Framer plugin.

Can I change how heavy the scroll feels?

Yes. Lower lerp values (default 0.1) make it heavier and slower; or set a duration and an easing.

Can I use it on a paid client site?

Yes. It is MIT licensed; keep the license notice with the code.