This is an Astro integration that adds simple and performant smooth-scrolling with Lenis.
Install the integration automatically using the Astro CLI:
npx astro add astro-lenis
pnpm astro add astro-lenis
yarn astro add astro-lenis
Or install it manually:
- Install the required dependencies
npm install astro-lenis
pnpm add astro-lenis
yarn add astro-lenis
- Add the integration to your
astro.config.mjs
+import lenis from "astro-lenis";
export default defineConfig({
integrations: [
+ lenis(),
],
});
This package is meant to be a simple drop-in smooth-scroll solution using the default Lenis configuration. If you need a more complex solution visit the Lenis Github.
MIT Licensed. Made with ❤️ by Matthew Justice.
@Bryceguy for helping me out so much with this in the discord
@Florian for making the template
@Houston because you're cute