1.0.0 • Published 4 years ago

createslider v1.0.0

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

CreateSlider

A super simple slider with all the basic functionality a slider needs!

Installation

Just run npm i createslider and require the function in your file

Usage

Theres only the singular createSlider() function that can take the following parameters in order

ParameterFunctionalityTypeDefault value
Wrappertargets the wrapper around your slideDOM Object
Items Per Slidenumber of items per slideinteger1
Autoplaytoggles autoplayboolfalse
Autoplay Intervalinterval between slide change (ms)integer4000
Quick Navtoggles visibility of quick navigation dotsbooltrue
Arrowstoggles visibility of Next and Prev slide buttonsbooltrue
Draggabletoggles the ability to drag the slides with mouse or touchbooltrue

Example

<div id="wrapper">
	<div>1</div>
	<div>2</div>
	<div>3</div>
	<div>4</div>
	<div>5</div>
</div>

const sliderWrapper = document.getElementById('wrapper');

createSlider( sliderWrapper, 2 , true , 5000 , true , false );