Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

wethegit/wtc-controller-carousel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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;

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •