The awesome-slider Vanilla JS custom element web component is a cool option to quickly add a slider/banner/gallery to your web projects.
-
Load the WebComponents polyfill:
<script src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/0.7.5/webcomponents.min.js"></script>
-
Import the custom element:
<link rel="import" href="/awesome-slider.html">
-
Use it:
<awesome-slider pre-image="/images/logo.svg" autostart="true" bullets="true"> <item source="/images/image-1.jpg"></item> <item source="/images/image-2.jpg"></item> <item source="/images/image-3.jpg"></item> </awesome-slider>
Install the component using Bower:
$ bower install awesome-slider --save
Join the discussion at the article page
- Checkout my Full-Stack Web Developer Website
- Other open source projects @ Code Laboratory
- A scope of my work @ Web Portfolio
Copyright 2015 Rafael Caferati