Search results
A free, fast, and reliable CDN for locomotive-scroll. Detection of elements in viewport & smooth scrolling with parallax effects.
import LocomotiveScroll from 'locomotive-scroll'; const scroll = new LocomotiveScroll({ el: document.querySelector('[data-scroll-container]'), smooth: true }); Note: scroll-sections are optional but recommended to improve performance, particularly in long pages.
A simple scroll library used by developers at Locomotive. Built as a layer on top of ayamflow's virtual-scroll, it provides smooth scrolling with support for parallax effects, toggling classes, and triggering event listeners when elements are in the viewport.
Add the base styles to your CSS file. [`locomotive-scroll.css`](https://github.com/locomotivemtl/locomotive-scroll/blob/master/dist/locomotive-scroll.css) #### JS. ##### With a bundler. ```js. import LocomotiveScroll from 'locomotive-scroll'; const scroll = new LocomotiveScroll(); ```. ##### Or without.
Detection of elements in viewport & smooth scrolling with parallax effects.. Latest version: 4.1.4, last published: 3 years ago. Start using locomotive-scroll in your project by running `npm i locomotive-scroll`. There are 20 other projects in the npm registry using locomotive-scroll.
gsap.registerPlugin(ScrollTrigger); // Using Locomotive Scroll from Locomotive https://github.com/locomotivemtl/locomotive-scroll const locoScroll = new LocomotiveScroll({ el: document.querySelector(".smooth-scroll"), smooth: true }); // each time Locomotive Scroll updates, tell ScrollTrigger to update too (sync positioning) locoScroll.on ...
1 CDN to use with LOCOMOTIVE-SCROLL. Find out the best CDN to use with locomotive-scroll or use multiple CDN as fallback. Simply copy and paste one of these URL !.