Yahoo India Web Search

Search results

  1. locomotive-scroll is a library for detecting elements in viewport and scrolling with parallax effects. jsDelivr is a free, fast, and reliable CDN for locomotive-scroll and other npm and GitHub packages.

    • Usage Statistics

      Load modern JavaScript packages built for you on-demand....

    • Files

      A free, fast, and reliable CDN for locomotive-scroll....

    • GitHub

      By using jsDelivr CDN URLs you get better performance...

    • Esm.Run

      A New-Age CDN for JavaScript modules Load modern JavaScript...

    • Blog

      During the night, on May 2, 2024, the jsDelivr CDN domain...

    • Purge Cache

      Purge Cache - locomotive-scroll CDN by jsDelivr - A CDN for...

    • About Us

      jsDelivr is a free CDN (Content Delivery Network) for open...

    • Our History

      The jsDelivr team builds PerfOps, a commercial service to...

    • Locomotive Scroll
    • Usage
    • Instance options
    • Instance methods
    • Progressive playing animations example (like gsap)
    • Browser support
    • Who's using Locomotive Scroll?

    Detection of elements in viewport & smooth scrolling with parallax effects.

    Basic

    With simple detection.

    Smooth

    With smooth scrolling and parallax. Note: scroll-sections are optional but recommended to improve performance, particularly in long pages.

    Advanced

    Make it do what you want.

    Option Type Default Description

    el object document Scroll container element.

    name string 'scroll' Data attribute prefix (data-scroll-xxxx).

    offset array(2) [0,0] Global in-view trigger offset : [bottom,top]

    Use a string with % to use a percentage of the viewport height.

    Use a numeric value for absolute pixels unit.

    Method Description Arguments

    init() Reinitializes the scroll.

    on(eventName, function) Listen instance events ⬇.

    update() Updates all element positions.

    destroy() Destroys the scroll events.

    start() Restarts the scroll events.

    All data-scroll elements have a progress value. In the on scroll event you can get all current in-view elements.

    HTML

    Works on most modern browsers. Chrome, Firefox, Safari, Edge...

    To get IE 11 support, you need polyfills. You can use your own or include these before our script.

  2. 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.

  3. 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.

  4. Dec 16, 2020 · Learn how to use Locomotive Scroll, a JavaScript library that lets you create scrolling effects like parallax and animations. See examples, setup, attributes, and framework integration.

  5. www.npmjs.com › package › locomotive-scrolllocomotive-scroll - npm

    locomotive-scroll is a JavaScript library that detects elements in viewport and scrolls them with parallax effects. It supports basic, smooth and advanced usage with options, methods and events.

  6. Loco (native) Scroll. Detection of elements in viewport & smooth native scrolling. The great locomotive-scroll without Smooth Class, merged with Lenis by Studio Freight to optimize the scrolling experience and keep native scrolling. I decided to merge the best of (for me) 2 great librairies for scrolling experiences.

  1. People also search for