DESIGN/设计资源·MOTION
darkroomengineering/lenis
不用写一行JS,一行HTML实现平滑滚动,这个16k星的开源库做到了。Smooth scrolling without writing a single line of JS?
Lenis 是一个让网页滚动变得平滑顺畅的 JavaScript 库,前端开发者可轻松集成。A lightweight smooth-scrolling library for web apps, compatible with vanilla JS, React, Vue, and no-code setups.
怎么装:Install: npm i lenis
02 / 现在的位置02 / Why now
首次发现FIRST SEEN
04 OCT 202604 OCT 2026
状态STATUS
持续活跃Active
项目在 GitHub 上有 16156 颗星标,社区认可度高Actively maintained with recent commits (1 commit in the last 7 days)
03 / 它能帮你做什么03 / What it helps you do
让网页滚动更顺滑
点击锚点能平滑跳转
让弹窗内部还能正常滚动
搭配GSAP动画时滚动不冲突
尊重系统减少动态效果的偏好
Add smooth scrolling with zero JavaScript code
Integrate smoothly with GSAP ScrollTrigger
Handle nested scrollable elements easily
Enable smooth anchor links with optional offset
Respect user's reduced motion preferences
04 / 安装04 / Install
$ Node 用户的安装方式。The install route for Node users.
两种装法选一个即可 —— 上面那条给命令行用户,下面那条给写代码的用户。Pick one of the two — the first is for command-line users, the second for people writing code.
使用 npm、yarn 或 pnpm 安装,例如 `npm i lenis`Install via npm, yarn, or pnpm with `npm i lenis`.
05 / 限制与风险05 / Limits and risk
风险不是警告,是可信度的一部分。以下结论只基于文档静态扫描,我们不会执行项目里的任何代码。Risk here is evidence, not an alarm. These findings come from static scanning of the docs; we never execute a project’s code.
限制LIMITS
未知Unknown
静态扫描STATIC SCAN
在 README、SKILL.md 和依赖清单中没有匹配到已知风险模式。No known risk patterns matched in the README, SKILL.md or dependency list.这不等于安全that does not mean it is safe,只能说明文档里没写。 — only that the docs do not mention it.
静态扫描未发现明显风险,但不代表安全。The static scan found no known risk patterns, but this does not guarantee complete security.
这里只做静态扫描:读 README、SKILL.md 和依赖清单,不执行代码。没有命中不代表安全。This is static scanning only: we read the README, SKILL.md and dependency list, and never execute code. No findings does not mean safe.
依赖:Dependencies:@nuxt/kit, react, vue
{
"agents": [],
"apiKey": null,
"docker": null,
"taxonomy": {
"scores": {
"design": 1,
"ai-tools": 0,
"dev-tools": 0,
"indie-web": 0,
"skill-agent": 0,
"productivity": 0
},
"primary": "design",
"secondary": "motion"
},
"localRuntime": null,
"skillMdTotal": 0,
"skillMdErrors": [],
"treeTruncated": false,
"categoryScores": {
"data": 0,
"agent": 0,
"media": 0,
"design": 1,
"browser": 0,
"devtool": 0,
"security": 0,
"marketing": 0,
"productivity": 0
},
"classification": [],
"scannedSources": [
"readme"
],
"skillMdFetched": 0
}