Create Fancy Momentum Sliders With JavaScript – momentum-slider.js

Category: Javascript , Recommended , Slider | August 18, 2018
Views Total:1,363 views
Official Page:Go to website
Last Update:August 18, 2018


Create Fancy Momentum Sliders With JavaScript – momentum-slider.js


The momentum-slider.js library lets you create a fancy content slider that comes with a momentum effect when transitioning between slides.

A typical use of this library is to create a carousel that enables the user to slide between images with a momentum scroll effect.

How to use it:

Download and insert the minified version of the momentum-slider.js library into the document.

<script src="/dist/momentum-slider.min.js"></script>

Initialize the library and pass the following parameters:

var mySlider = new MomentumSlider({
    el: '.ms-container',
    cssClass: '',
    vertical: false,
    multiplier: 1,
    bounceCoefficient: 0.3,
    bounceMax: 100,
    loop: 0,
    interactive: true,
    reverse: false,
    currentIndex: 0

Check out the demo page for more usage.

You Might Be Interested In:

One thought on “Create Fancy Momentum Sliders With JavaScript – momentum-slider.js

  1. dziku86

    I’m looking for a way to disable vertical scrolling in slider container and only allow to horizontal interactions. The problem is, that when you scroll page on mobile device and you stumble upon the slider, you can’t scroll the page further. You can only scroll vertically. I think the problem lies in Pointer Events API.


Leave a Reply