wtc-controller-carousel

2.0.4 • Public • Published

wtc-controller-carousel

Infinite sliding carousel. Example on Codepen.

Usage

Install wtc-controller-carousel with npm. npm install wtc-controller-carousel

  1. Add the markup to your template
<div class="carousel">
  <div class="carousel__container">
    <div class="carousel__item">
      <!-- stuff -->
    </div>
    <div class="carousel__item carousel__item--2">
      <!-- stuff 2-->
    </div>
  </div>
</div>
  1. Import the css into your project.
@import ~wtc-controller-carousel;
  1. Import the library into your JS and instanciate it
import Carousel from "wtc-controller-carousel";

const myCarousel = new Carousel(document.querySelector(".carousel"));

Examples

Pausing

myCarousel.paused = true;

Changing speed

myCarousel.speed = 4;

Readme

Keywords

none

Package Sidebar

Install

npm i wtc-controller-carousel

Weekly Downloads

43

Version

2.0.4

License

MIT

Unpacked Size

51.8 kB

Total Files

13

Last publish

Collaborators

  • wethecollective