Detection of elements in viewport & smooth scrolling with parallax.
Detection of elements in viewport & smooth scrolling with parallax.
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';Check out the examples and playground
Next.js example unavailable
[data-scroll-offset="calc(100% - 100px), 0"]
Bump lenis to 1.3.18
Expose a useLocomotiveScroll hook
data-scroll-delay for v5
Global enable on mobile without data-scroll-enable-touch-speed tag.