# Splide
[Splide](https://splidejs.com/) is a lightweight, powerful and flexible slider and carousel, written in pure JavaScript without any dependencies.
* [Demo](https://splidejs.com/)
* [Documents](https://splidejs.com/category/users-guide/)
## Features
* Pure JavaScript without any dependencies
* Small size, less than 27kB(10kB gzipped)
* Flexible and extensible
* Multiple slides
* Slide or fade transition by CSS
* Responsive, supporting breakpoints
* Accepting CSS relative units, such as vw, %, rem, etc
* No need to crop images
* Autoplay with progress bar and play/pause buttons
* "Right to left" and vertical direction
* Mouse drag and touch swipe
* Nested slider
* Lazy loading
* Thumbnail slider
* Accessibility friendly, supporting keyboard control and ARIA attributes
* Internet Explorer 10
## Installation
There are 3 ways to install the Splide on your site.
* NPM
* Download
* CDN
Only the NPM way is explained in the following steps. Visit [this page](https://splidejs.com/getting-started/) for other methods.
1. Get the latest version by NPM:
```bash
$ npm install @splidejs/splide
```
1. Link to the stylesheet:
```html
```
1. Write HTML for building a slider:
```html
Slide 01
Slide 02
Slide 03
```
1. Initialize Splide. The selector accepts an ID, a class name or an Element itself:
```javascript
import Splide from '@splidejs/splide';
new Splide( '#splide' ).mount();
```
Note that only the first element will be initialized even if using a class name.
## Options
### Changing Options
Pass an object to the second argument of the ```Splide``` constructor:
```javascript
new Splide( '#splide', {
type : 'loop',
perPage: 3,
} );
```
Or set a ```data-splide``` attribute to a root element in a JSON format:
```html