image_slideshow
v1.0.3
Published
Responsive image slideshow compatible with any JS framework
Downloads
11
Readme
Image slideshow
Responsive canvas image slideshow compatible with any JS framework.
Features
- Resizes canvas to parent div width;
- Slide change at set interval;
- Smooth slide change with mouse/touch input;
- Chnage to desired slide with custom buttons.
Usage
<div>
<canvas id='slideshow_canvas'/>
</div>
import ImageSlideshow from 'image_slideshow'
let image_slideshow = new ImageSlideshow()
image_slideshow.init(document.getElementById("slideshow_canvas"), 10/16, 10)//image slideshow canvas, height to width ratio of canvas, slide change interval in seconds
let images = []
//load images and pass them to slideshow (HTMLImageElement)
image_slideshow.setSlides(images)