MCPcopy Index your code
hub / github.com/locomotivemtl/locomotive-scroll

github.com/locomotivemtl/locomotive-scroll @v5.0.1 sqlite

repository ↗ · DeepWiki ↗ · release v5.0.1 ↗
822 symbols 2,099 edges 50 files 98 documented · 12%
README

Locomotive Scroll

npm version npm downloads bundle size

A lightweight & modern scroll library for detection, animation, and smooth scrolling. Built on top of Lenis.

Documentation

Full documentation available at scroll.locomotive.ca/docs.

Quick Start

npm install locomotive-scroll
import LocomotiveScroll from 'locomotive-scroll';

const scroll = new LocomotiveScroll();
@import 'locomotive-scroll/dist/locomotive-scroll.css';


I move at half speed


Features

  • Lightweight — Only 9.4kB gzipped
  • TypeScript First — Fully typed
  • Built on Lenis — Latest stable release with improved performance
  • Dual Intersection Observers — Optimized detection for triggers vs. animations
  • Smart Touch Detection — Parallax auto-disabled on mobile
  • Accessible — Native scrollbar, keyboard navigation, proper ARIA support

Demo

Check out the examples and playground

Support

GitHub Issues

Extension points exported contracts — how you extend this code

ILenisScrollValues (Interface)
(no doc)
packages/lib/types.ts
IScreenValues (Interface)
(no doc)
packages/demo/src/stores/screen.ts
ILenisScrollTo (Interface)
(no doc)
packages/lib/types.ts
IScreenDebounceValues (Interface)
(no doc)
packages/demo/src/stores/screen.ts
ILenisScrollToOptions (Interface)
(no doc)
packages/lib/types.ts
ILocomotiveScrollOptions (Interface)
(no doc)
packages/lib/types.ts
IScrollElementOptions (Interface)
(no doc)
packages/lib/types.ts

Core symbols most depended-on inside this repo

I
called by 56
www/landing/assets/scripts/app.js
split
called by 52
www/landing/assets/scripts/app.js
kill
called by 34
www/landing/assets/scripts/app.js
revert
called by 26
www/landing/assets/scripts/app.js
n
called by 25
www/landing/assets/scripts/app.js
ft
called by 23
www/landing/assets/scripts/app.js
t
called by 21
www/landing/assets/scripts/app.js
reset
called by 21
www/landing/assets/scripts/app.js

Shape

Function 474
Method 298
Class 36
Interface 14

Languages

TypeScript100%

Modules by API surface

www/landing/assets/scripts/app.js487 symbols
packages/lib/bundled/locomotive-scroll.js54 symbols
packages/lib/bundled/locomotive-scroll.min.js41 symbols
packages/lib/types.ts20 symbols
packages/lib/index.ts19 symbols
packages/lib/core/ScrollElement.ts19 symbols
packages/lib/core/Core.ts16 symbols
packages/landing/assets/scripts/modules/Rail.js16 symbols
packages/landing/assets/scripts/utils/fonts.js15 symbols
packages/landing/assets/scripts/modules/Scroll.js12 symbols
packages/landing/assets/scripts/modules/FadeInText.js12 symbols
packages/landing/assets/scripts/modules/MaskLines.js11 symbols

Dependencies from manifests, versioned

@11ty/eleventy2.0.1 · 1×
@11ty/eleventy-img4.0.2 · 1×
@astrojs/check0.9.2 · 1×
@astrojs/tailwind5.1.0 · 1×
@docusaurus/core3.9.2 · 1×
@docusaurus/module-type-aliases3.9.2 · 1×
@docusaurus/preset-classic3.9.2 · 1×
@docusaurus/types3.9.2 · 1×
@easyops-cn/docusaurus-search-local0.44.5 · 1×
@factorial/eleventy-plugin-twig0.1.2 · 1×
@locomotivemtl/postcss-tailwind-shortcuts1.0.0 · 1×
@mdx-js/react3.0.0 · 1×

For agents

$ claude mcp add locomotive-scroll \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact