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

Category: Javascript , Recommended , Slider | August 18, 2018
Author: lmgonzalves
Views Total: 1,191
Official Page: Go to website
Last Update: August 18, 2018
License: MIT


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:

Leave a Reply