Get Started

Svelte Lenis is a library that helps you smoothly scroll through your page. It's built on Lenis

Requirements

Supports projects created using Svelte 5.

Install

Install Svelte Lenis using your package manager of choice.
pnpm add svelte-lenis
bun add svelte-lenis
npm install svelte-lenis

Usage

<script>
  import { SvelteLenis } from 'svelte-lenis'
</script>

<SvelteLenis root>
  <!-- content -->
</SvelteLenis>

Props

OnSetup

type OnSetup = (value: {
	lenis: Lenis;
	wrapper?: HTMLDivElement;
	content?: HTMLDivElement;
}) => void;