1.1.3 • Published 9 years ago

mithril.component.slideshow v1.1.3

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

mithril slideshow component

This creates a slideshow in mithril

Install

npm install mithril.component.slideshow

Usage

First include mithril.js, and the js and css files:

<script src="lib/mithril.js"></script>
<script src="dist/mithril.component.slideshow.js"></script>
<link rel="stylesheet" type="text/css" href="dist/mithril.component.slideshow.css">

Then in your view, simply initialise with the images you want to show, as a property, using the state:

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
1.1.3

9 years ago

1.1.2

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.9

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago