Mithril slideshow component
npm install mithril.component.slideshowThis creates a slideshow in mithril
``bash`
npm install mithril.component.slideshow
First include mithril.js, and the js and css files:
`html`
Then in your view, simply initialise with the images you want to show, as a property, using the state:
`javascript``
return m.components.mSlideshow({state: {
imgs: m.prop([
{src: "img/uboat.jpg"},
{src: "img/bridge.jpg"}
])
}});
You can optionally set the following attributes:
* auto - should we automatically advance, default is false
* time - the amount of milliseconds the slideshow waits before advancing, default is 7000
* showButtons - should we show the left/right buttons, default is true
* showDots - should we show dots at the bottom, default is true