Yahoo India Web Search

Search results

  1. A free, fast, and reliable CDN for locomotive-scroll. Detection of elements in viewport & smooth scrolling with parallax effects.

    • Usage Statistics

      Statistics. Global internet insights from jsDelivr, based on...

    • 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 jsDelivr CDN cache Purge the cache of a @latest or...

    • 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?
    • GeneratedCaptionsTabForHeroSec

    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.

    Locomotive Scroll is a library that detects elements in viewport and scrolls them with smoothness and parallax effects. It supports various options, methods, events and contexts for customization and performance optimization.

  2. Locomotive Scroll is a scroll library used by developers at Locomotive, a web design agency. It supports smooth scrolling, parallax effects, toggling classes, and event listeners when elements are in the viewport.

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

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

  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