Back to skills
SKILL.md
Locomotive Scroll
ASecurityImplement 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
Security analysis
96/100- Installs packages at runtime which could introduce malicious dependencies
Pro scans all 2 files and shows the line behind each finding
npx -y skills add siddu1004/SFP --skill locomotive-scroll --agent claude-codeAre you the author of Locomotive Scroll?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/siddu1004-locomotive-scroll)---
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
- LICENSE
- SKILL.md
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.