lenis-react
Integrate Lenis smooth scroll into React and Next.js projects.
Skill by 12-Studio
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/12-studio-lenis-react
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: frontend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/lenis-react
What's inside
- Skill name
lenis-react- Description
- Integrate Lenis smooth scroll into React and Next.js projects. Use when the user wants smooth scrolling, scroll-linked animations, parallax effects, GSAP ScrollTrigger sync, Framer Motion sync, programmatic scroll-to navigation, or scroll event listening in a React app. Covers ReactLenis provider setup, useLenis hook, custom scroll containers, SSR/Next.js considerations, and accessibility.
- License
- MIT
- Instructions
- 436 lines in SKILL.md · view on GitHub
Files (3)
- SKILL.md
- accessibility.md · references/
- recipes.md · references/
SKILL.md (first lines)
# 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.
---
## 1. Installation
```bash
npm install lenis
# or
yarn add lenis
# or
pnpm add lenis
```
Also add Lenis's required CSS (critical for correct layout):
```css
/* In your global CSS file */
html.lenis, html.lenis body {
height: auto;
}
.lenis.lenis-smooth {
scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
overscroll-behavior: contain;
}
.lenis.lenis-stopped {
overflow: hidden;
}
.lenis.lenis-smooth iframe {
pointer-events: none;
}
```
Or import from the package directly:
```js
import 'lenis/dist/lenis.css'
```
---
## 2. Minimal Setup (full-page scroll)
```tsx
// app/layout.tsx OR src/main.tsx
import { ReactLenis } from 'lenis/react'
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>
<ReactLenis root>
{children}
</ReactLenis>
</body>
</html>
)
}
```
- `root` prop: Lenis hijacks the `<html>` scroll container (the standard full-page case).
- RAF loop is managed automatically when `autoRaf` is not disabled.
---
## 3. Common Configuration Options
Pass options via the `options` prop on `<ReactLenis>`:
```tsx
<ReactLenis
root
options={{
lerp: 0.1, // Smoothing factor (0–1). Lower = smoother but slower. Default: 0.1
duration: 1.2, // Scroll animation duration in seconds (ignored if lerp set)
easing: (t) => Math.min(1, 1.001 - Math.pow(2, -10 * t)), // Custom easing
orientation: 'vertical', // 'vertical' | 'horizontal'
gestureOrientation: 'vertical', // 'vertical' | 'horizontal' | 'both'
smoothWheel: true, // Smooth wheel events (default: true)
smoothTouch: false, // Smooth touch scroll — keep false unless intentional (can feel unnatural)
touchMultiplier: 2, // Touch sensitivity
infinite: false, // Infinite scroll
}}
>
{children}
</ReactLenis>
```
**Decision guide:**
- For most marketing sites: `lerp: 0.08–0.12` feels natural.
- For heavy creative/portfolio sites: `lerp: 0.05–0.08` for extra drag.
- Never set `smoothTouch: true` without thorough iOS testing — can feel laggy.
- Prefer `lerp` over `duration` unless you need deterministic timing (e.g., carousel snapping).
---
## 4. useLenis Hook
`useLenis` returns the Lenis instance and optionally registers a scroll callback:From 12-Studio/Tackl, MIT.
More from 12-Studio/Tackl
- 0.630score
react-hook-creator
12-Studio
Create react hook creator operations.
SkillAFreshness: A★ 10Claude Code +9 - 0.630score
webgl-expert
12-Studio
Expert guide for WebGL API development including 3D graphics, shaders (GLSL), rendering pipeline, textures, buffers, performance optimization, and canvas…
SkillAFreshness: A★ 10Claude Code +9 - 0.630score
gsap-tackl
12-Studio
Implements and orchestrates GSAP in Tackl — useAnimation, useGSAP, ScrollTrigger, Lenis sync, page transitions, and reduced-motion fallbacks.
SkillAFreshness: A★ 10Claude Code +9 - 0.630score
tackl-performance
12-Studio
Optimizes Tackl apps for Web Vitals, reduced motion, and scroll performance.
SkillAFreshness: A★ 10Claude Code +9 - 0.630score
react-context-setup
12-Studio
Configure react context setup operations.
SkillAFreshness: A★ 10Claude Code +9 - 0.630score
scss-modules
12-Studio
Styles React components with SCSS CSS Modules and the Tackl design system.
SkillAFreshness: A★ 10Claude Code +9 - 0.626score
motion-framer
12-Studio
Modern animation library for React and JavaScript.
SkillAFreshness: A★ 10Claude Code +9 - 0.626score
threejs-webgl
12-Studio
Comprehensive skill for Three.js 3D web development.
SkillAFreshness: A★ 10Claude Code +9 - 0.622score
react-three-fiber
12-Studio
Build declarative 3D scenes with React Three Fiber (R3F) - a React renderer for Three.js.
SkillAFreshness: A★ 10Claude Code +9 - 0.621score
web3d-integration-patterns
12-Studio
Meta-skill for combining Three.js, GSAP ScrollTrigger, React Three Fiber, Motion, and React Spring for complex 3D web experiences.
SkillAFreshness: A★ 10Claude Code +9 - 0.600score
grilling
12-Studio
Grill the user relentlessly about a plan or design.
SkillAFreshness: A★ 10Claude Code +9 - 0.594score
handoff
12-Studio
Compact the current conversation into a handoff document for another agent to pick up.
SkillAFreshness: A★ 10Claude Code +9
Signals
- Stars
- 10
- Forks
- 2
- Open issues
- 0
- Last commit (this folder)
- Jul 22, 2026 (3 months ago)
- Last release
- Oct 11, 2026 (17 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/12-Studio/Tackl
- Website
- tackl.netlify.app/
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from 12-Studio
- 0.630score
gsap-tackl
12-Studio
Implements and orchestrates GSAP in Tackl — useAnimation, useGSAP, ScrollTrigger, Lenis sync, page transitions, and reduced-motion fallbacks.
SkillAFreshness: A★ 10Claude Code +9 - 0.630score
tackl-performance
12-Studio
Optimizes Tackl apps for Web Vitals, reduced motion, and scroll performance.
SkillAFreshness: A★ 10Claude Code +9 - 0.630score
react-context-setup
12-Studio
Configure react context setup operations.
SkillAFreshness: A★ 10Claude Code +9 - 0.630score
react-hook-creator
12-Studio
Create react hook creator operations.
SkillAFreshness: A★ 10Claude Code +9 - 0.630score
scss-modules
12-Studio
Styles React components with SCSS CSS Modules and the Tackl design system.
SkillAFreshness: A★ 10Claude Code +9 - 0.630score
webgl-expert
12-Studio
Expert guide for WebGL API development including 3D graphics, shaders (GLSL), rendering pipeline, textures, buffers, performance optimization, and canvas…
SkillAFreshness: A★ 10Claude Code +9
Cite this page
lenis-react skill. Agent Mart. https://agentmart.dev/skills/12-studio-lenis-react (last updated 2026-10-24)