image_slideshow
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

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

npm install svg-path-bounds

<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)

Readme

Keywords

Package Sidebar

Install

npm i image_slideshow

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

13.4 kB

Total Files

5

Last publish

Collaborators

  • simas_z