locomotive-scroll
Implement smooth scrolling, parallax effects, and scroll-triggered animations using Locomotive Scroll. Use when adding smooth inertia scrolling, scroll-bound…
от siddu1004★ 43 звезды на GitHub
Установить locomotive-scroll в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Locomotive Scroll
Smooth scrolling and scroll-driven animation library (locomotivemtl/locomotive-scroll). Enables inertia scrolling, viewport detection, speed-differentiated parallax, and directional scroll events.
Use This Skill When
- Adding smooth momentum scrolling to landing pages and editorial websites.
- Implementing parallax transforms driven by viewport scroll progress (
data-scroll-speed). - Triggering CSS classes or callbacks as elements enter or leave the viewport.
Installation & Setup
npm install locomotive-scroll
import LocomotiveScroll from 'locomotive-scroll';
const scroll = new LocomotiveScroll({
el: document.querySelector('[data-scroll-container]'),
smooth: true,
multiplier: 1.0,
});
HTML Markup Attributes
<main data-scroll-container>
<!-- Element moving faster than scroll rate -->
<section data-scroll-section>
<h1 data-scroll data-scroll-speed="2">Fast Header</h1>
<p data-scroll data-scroll-speed="-1">Slow Floating Text</p>
</section>
<!-- Element triggering on-screen class -->
<div data-scroll data-scroll-class="is-revealed" data-scroll-repeat="true">
Revealed Block
</div>
</main>
Accessibility & Performance Checks
- Disable smooth scroll under
@media (prefers-reduced-motion: reduce). - Call
scroll.update()after asynchronous image loads or dynamic DOM mutations to recalculate scroll heights. - Ensure native keyboard scrolling (
Space,PageDown, arrow keys) remains functional.
Sources
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- LICENSE
FAQ
Что делает скилл locomotive-scroll?
Implement smooth scrolling, parallax effects, and scroll-triggered animations using Locomotive Scroll. Use when adding smooth inertia scrolling, scroll-bound transforms, sticky containers, or scroll-reveal effects in web interfaces.
Как установить скилл locomotive-scroll?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл locomotive-scroll запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
AnthropicGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
webapp-testing
AnthropicToolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
brand-guidelines
AnthropicApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
web-artifacts-builder
AnthropicSuite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…