4.6.0 • Published 5 years ago

vm-slider-js v4.6.0

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

What is this?

Get simple slider for your application

demo

Version

4.4.0

Installation

Install the package

npm
npm install vm-slider-js
yarn
yarn add vm-slider-js

Usage

HTML
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Slider App</title>
    <style>
        * {
            box-sizing: border-box;
        }
    </style>
</head>

<body>
    <div id="slider">
        <img src="#" alt="Slider #1" />
        <img src="#" alt="Slider #2" />
        <img src="#" alt="Slider #3" />
        <img src="#" alt="Slider #4" />
    </div>

    <script src="./dist/vm-slider-js.js"></script>
    <script>
        document.addEventListener("DOMContentLoaded", function (event) {
            new SliderJS('slider', options)
        })
    </script>
</body>

</html>
NPM
import { SliderJS } from 'vm-slider-js'

new SliderJS('slider', options)

Options

You can pass the 2nd argument as an object with options

SliderJS supports 5 options which are all optional:

  • width - size of images in (px) (Default 940)
  • height - height of images (px) (Default is 270)
  • iconSize - height of icons (px) (Default is 60)
  • timeout - auto sliding timer (ms) (Default is 3000)
  • hideControls - true / false (Default is false)
4.6.0

5 years ago

4.5.0

5 years ago

4.4.0

5 years ago

4.1.0

5 years ago

4.3.0

5 years ago

4.2.0

5 years ago

4.0.0

5 years ago

3.9.0

5 years ago

3.8.0

5 years ago

3.7.0

5 years ago

3.6.0

5 years ago

3.5.0

5 years ago

3.4.0

5 years ago

3.3.0

5 years ago

3.2.0

5 years ago

3.1.0

5 years ago

3.0.0

5 years ago

2.6.0

5 years ago

2.3.0

5 years ago

2.2.0

5 years ago

2.5.0

5 years ago

2.4.0

5 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.11.0

5 years ago

1.10.0

5 years ago

1.9.0

5 years ago

1.8.0

5 years ago

1.7.0

5 years ago

1.6.0

5 years ago

1.5.0

5 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago