Command Palette

Search for a command to run...

Назад к скиллам
скилл № 97653

locomotive-scroll

Implement smooth scrolling, parallax effects, and scroll-triggered animations using Locomotive Scroll. Use when adding smooth inertia scrolling, scroll-bound…

БесплатноБез исполняемых скриптов
siddu1004от 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), без исполняемых скриптов.

Похожие скиллы

Сравнить locomotive-scroll с