Create a free website with Framer, the website builder loved by startups, designers and agencies.
import { useEffect } from "react" import Lenis from "@studio-freight/lenis" export default function SmoothScrolling() { useEffect(() => { const lenis = new Lenis({ duration: 1.2, easing: (t: number) => 1 - Math.pow(1 - t, 3), smoothWheel: true, smoothTouch: false, }) function raf(time: number) { lenis.raf(time) requestAnimationFrame(raf) } requestAnimationFrame(raf) return () => { lenis.destroy() } }, []) return null }