The Tweet

In 2022 I was at the Awwwards Conference in Amsterdam. Good talks, the usual crowd of people who care too much about easing curves — my kind of event. At one point, during a session about smooth scrolling, a slide appeared with a screenshot of a tweet I had posted. The speakers explained that this tweet had been one of the things that inspired them to start building Lenis. I was not expecting that!

Lenis, if you are not familiar with it, is a smooth scroll library developed by the team at darkroom.engineering. It has since become one of the most widely adopted tools in creative frontend development — used on award-winning sites, picked up by agencies around the world, integrated into workflows I see referenced constantly. It is, by any measure, an excellent library.
I do not use it myself. That requires some explanation.

Why I built my own

Around the same time I posted that tweet, I had already started putting together my own scroll library. Not as a product — just as the natural result of solving the same scroll-related problems repeatedly across projects and wanting a single, consistent tool I could trust. I used this heavily on beautiful websites for architects, interior designers and various portfolios (often as a white-label developer).

Over the years that library has grown to handle the specific scenarios I run into most often:

Because the library grew organically from real projects, it is deeply entangled with the rest of how I build things. Swapping it out for something else would not be a simple dependency change — it would mean rethinking a set of patterns that have been refined across a lot of work.

What Lenis gets right

If you do not already have something like the above, Lenis is where I would tell you to start — without hesitation.

The API is clean and predictable. The defaults are sensible. It handles the genuinely fiddly parts of smooth scrolling — momentum, lerp, scroll event normalisation across browsers and devices — in a way that would take a meaningful amount of time to replicate correctly from scratch. The documentation is good. The community around it is active.

For most frontend developers working on creative sites, Lenis will give you better scroll behaviour than anything you would build yourself in the time available on a typical project. That is a meaningful statement, and I mean it.

Accessibility — an underappreciated advantage

One thing worth mentioning about both Lenis and my own library: neither uses the kind of tricks that give smooth scrolling a bad reputation among accessibility advocates. The classic problematic approach is hijacking scroll entirely — faking a position: fixed container and translating it with JavaScript, so the browser's native scroll never actually fires. This breaks a lot of things: the scrollbar stops being reliable, keyboard navigation with arrow keys no longer works as expected, and assistive technologies get confused because the document structure no longer maps to what is visually on screen. Lenis does not do this. My library does not do this. Both work by adding easing to the native scroll position — the browser is still scrolling, the scrollbar still reflects where you are, and you can grab it at any time. Arrow keys work. Screen reader navigation works. The experience is enhanced, not replaced. This matters practically as well as ethically. Accessibility compliance is increasingly a requirement rather than a nice-to-have, particularly for public sector clients and larger organisations. Knowing that your smooth scroll implementation will not introduce a compliance problem is worth something.

The broader point about scroll

Smooth scrolling is one of those things that looks simple from the outside and reveals its complexity only when you try to build something genuinely flexible with it. The default browser scroll is fast and accessible, but it offers almost no hooks for the kind of scroll-driven experiences that have become central to creative web work. The moment you want eased momentum, scroll-linked animation, or any real control over how the scroll position feeds into your UI, you are in territory that requires a considered implementation.

Lenis solves that problem well. My library solves it in the specific way that works for how I build. Neither approach is better in the abstract — what matters is that you have thought it through rather than bolting something on at the end and hoping for the best.

If you are starting a project and wondering what to reach for: try Lenis. It earned its reputation.

Michael Vestergaard is a freelance frontend developer and UX engineer. Get in touch if you are working on something that needs to move well.