A lightweight & modern scroll library for detection, animation, and smooth scrolling. Built on top of Lenis.
Full documentation available at scroll.locomotive.ca/docs.
npm install locomotive-scrollimport LocomotiveScroll from 'locomotive-scroll';
const scroll = new LocomotiveScroll();@import 'locomotive-scroll/dist/locomotive-scroll.css';<div data-scroll data-scroll-speed="0.5">I move at half speed</div>- 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
Check out the examples and playground