component-install stagas/infinite-carousel
<div id="my-carousel">
<ul>
<li>Item 1
<li>Item 2
</ul>
</div>
var Carousel = require('infinite-carousel');
var el = document.getElementById('my-carousel');
var carousel = Carousel(el);
Show next item.
Show previous item.
For a slide effect use this in your css:
.carousel li {
transition: .4s all ease;
-webkit-transition: .4s all ease;
-moz-transition: .4s all ease;
-o-transition: .4s all ease;
}
This is a modified version of tomerdmnt/carousel (MIT)
MIT