lenis-react
Installation
SKILL.md
Lenis Smooth Scroll — React Integration Skill
Overview
Lenis (Latin: "smooth") is a lightweight, performant smooth-scroll library by darkroom.engineering. The lenis/react sub-package provides a <ReactLenis> context provider and a useLenis hook, eliminating prop-drilling and tying the RAF loop into React's lifecycle automatically.
Package landscape (important — use the right import):
| Package | Status | Import |
|---|---|---|
lenis |
✅ Current (v1+) | import { ReactLenis, useLenis } from 'lenis/react' |
@studio-freight/lenis |
⚠️ Legacy | import Lenis from '@studio-freight/lenis' |
@studio-freight/react-lenis |
⚠️ Legacy | import { ReactLenis } from '@studio-freight/react-lenis' |
Always use the current lenis package unless the project explicitly pins to the legacy packages.