Skip to content
Back to skills

Locomotive Scroll

ASecurity

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.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
ai-agentsjavascriptjavabashgitperformance

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 2 files and shows the line behind each finding

Scanned November 11, 2026

npx -y skills add siddu1004/SFP --skill locomotive-scroll --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Locomotive Scroll?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Locomotive Scroll
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/siddu1004-locomotive-scroll/badge)](https://www.skillsdirectory.com/skills/siddu1004-locomotive-scroll)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: locomotive-scroll
description: "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

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

```bash
npm install locomotive-scroll
```

```javascript
import LocomotiveScroll from 'locomotive-scroll';

const scroll = new LocomotiveScroll({
  el: document.querySelector('[data-scroll-container]'),
  smooth: true,
  multiplier: 1.0,
});
```

## HTML Markup Attributes

```html
<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

- [Locomotive Scroll GitHub Repository](https://github.com/locomotivemtl/locomotive-scroll)

Files in this skill

  • LICENSE72 B
  • SKILL.md1.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.