1.0.6 • Published 7 years ago

papaslider v1.0.6

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

Papa slider

A light and simple Javascript slider library ( ~2.5KB size ). This library is still maintained.

Recomended by alt text

Support

Works on IE11, so it works everywhere.

Demo

Live demo

Usage

Install by npm

    npm install papaslider --save

Add HTML elements

    <div class="papa-container">
        <div class="prev"> < </div> <!-- If you add type: 'self' - changing slides by arrows -->
        <div class="papa-item"></div>
        <div class="papa-item"></div>
        <div class="papa-item"></div>
        <div class="papa-item"></div>
        <div class="papa-item"></div>
        <div class="next"> > </div> <!-- If you add type: 'self' - changing slides by arrows -->
    </div>

Include Papa Slider's code in your HTML at the end of body tag

    <script src="dist_folder/papa-slide.min.js"></script>

Call the plugin in your main.js file ( every option has default value more in table )

    document.addEventListener("DOMContentLoaded", function() {
        let papa = new PapaSlider({
            container: 'papa-container',
            items: 'papa-item',
            timeInterval: '3000',
            animationType: 'fade',
            type: 'auto',
        });
    });

Styling

You can find default css styles in papaslider folder.

Settings

OptionTypeDefaultDescription
containerstringpapa-containerYour container class name.
itemsstringpapa-itemYour item class name.
timeIntervalstring3000After this time, the next slide appears. Pass the string in miliseconds.
animationTypestringfadeOptions are: 1) 'fade' - works like fadeIn / fadeOut. 2) 'slide' - works like slide to left.
typestringautoOptions are: 1) 'auto' - automatically changes the slide. 2) 'self' - The slide is changed by the arrows.

License

MIT License

1.0.6

7 years ago

1.0.5

7 years ago

1.1.0

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago