Kaizhi Wei

Senior Software Engineer / Team Lead @ Centro

Introducing Polymer-Slideshow

I recently discovered the Polymer and thought I'd create a simple project to explore some of the core concepts introduced with Polymer and the upcoming Web Components spec. I present: a simple slideshow element built with Polymer.js.


Compatibility Disclaimer

This will probably only work on the latest/nightlies of major browsers. Please refer to the polymer compatibility page for more info.


You can see it in action here


Include the polymer library and element template

<script src="polymer.min.js" type="text/javascript"></script>
<link rel="import" href="polymer-slideshow.html">

Use the tag on your page

  <img src="foo.jpg" alt="image" />
  <img src="bar.jpg" alt="image" />

Optional attributes:

width //sets the width
height //sets the height
auto //whether to trigger the slideshow
timer //interval at which to perform the slideshow