0.1.5 • Published 5 years ago

@kashuab/ez-slider v0.1.5

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

EZSlider

Zero-dependencies, smooth animations, easy usage. All written in TypeScript.

This project is currently in an experimental stage. Expect breaking changes to occur frequently.

Installation

Currently, we only support installing the node module:

npm install @kashuab/ez-slider

Usage

Add data-ez-slider to the parent element of your slides:

<div class="slider" data-ez-slider>
  <div class="slide" style="background-image: url(https://placekitten.com/3840/2160);"></div>
  <div class="slide" style="background-image: url(https://placekitten.com/3840/2160);"></div>
  <div class="slide" style="background-image: url(https://placekitten.com/3840/2160);"></div>
</div>

In your JS:

import '@kashuab/ez-slider';

const ezSlider = new EZSlider();

The EZSlider class will look for elements with the data-ez-slider attribute and attach to them.

All done!