CarouselJS is a simple way to add a slider.
Adding the script.
<script src="https://cdn.jsdelivr.net/npm/carousel-slider-js/dist/carousel-js.min.js" ></script>
Or install
npm i --save carousel-js
and using with browserify
carousel(carouselImageElement, prevNavElement, nextNavElement, images, delay);
carouselImageElement : The img element.
prevNavElement : The element with the control prev img.
prevNavElement : The element with the control next img.
images : An array with the images.
delay : the time in milliseconds to delay the change.