1.1.3 • Published 8 years ago

mithril.component.slideshow v1.1.3

Weekly downloads
2
License
MIT
Repository
github
Last release
8 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

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago