An open API service indexing awesome lists of open source software.

https://github.com/katik/thumbnail-slider

thumbnail-slider is a simple slider for a list of images which can be used in photo albums likewise and has both row and column modes.
https://github.com/katik/thumbnail-slider

vue-slider

Last synced: 2 days ago
JSON representation

thumbnail-slider is a simple slider for a list of images which can be used in photo albums likewise and has both row and column modes.

Awesome Lists containing this project

README

          

# Overview

thumbnail-slider is a simple slider for a list of images which can be used in photo albums likewise.

# Install

```bash
$ npm install thumbnail-slider
```

## Import using module
Import components to your project:

```JavaScript
require('thumbnail-slider/dist/thumbnailSlider.css');

// in ES6 modules
import { TnSlider, TnItem } from 'thumbnail-slider';

// in CommonJS
const { TnSlider, TnItem } = require('thumbnail-slider');

// in Global variable
const { TnSlider, TnItem } = ThumbnailSlider;
```

And register components:

```javascript
Vue.component('tn-slider', TnSlider);
Vue.component('tn-item', TnItem);
```

## Import using script tag

``` HTML

```

```JavaScript
import { TnSlider, TnItem } from 'thumbnail-slider';

export default{
name:'app',
components: {
'tn-item': TnItem,
'tn-slider': TnSlider,
},
data() {
return{
index: 0,
slides: [
{ src: 'https://cdn.pixabay.com/photo/2016/11/07/05/13/map-1804891__480.jpg' },
{ src: 'https://cdn.pixabay.com/photo/2016/11/07/05/13/map-1804891__480.jpg' },
{ src: 'https://cdn.pixabay.com/photo/2016/11/07/05/13/map-1804891__480.jpg' },
]
}
},
methods:{
clickItem(i){
this.index = i;
},
}
};
```

# Usage

Work on a Vue instance:

```HTML

prev





notes: blabla




next

```

```CSS
.customed-item {

}
.prev-icon {

}
.next-icon {

}
```

# Options

Here list Props and events on the component

| Option | Description |
| ----- | ----- |
| counts | Number(default: 1) slide items per view. |
| index | Number (default:0) - current slide item in middle |
| direction | String (default:'row') - the direction of slide, which can be 'row' or 'column' |
| animation | String (default:'ease') - now only 2 options: 'none' or 'ease' |
| animation-time | Number (default:'400') - time for animation |
| @on-item-click | function - trigged when slide item be clicked|

# Develop

```bash
$ npm run dev
$ npm run build
```

# Many thanks to
[transform.js](http://alloyteam.github.io/AlloyTouch/transformjs/)

# License
MIT