# multipleable-slider

> multipleable slider on mobile

Latest version **1.1.2** (published 2018-01-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install multipleable-slider
pnpm add multipleable-slider
yarn add multipleable-slider
bun add multipleable-slider
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2018-01-20 |
| First published | 2017-06-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | liu_yan |
| Maintainers | liu_yan |
| Keywords | es6, slider, carousel, modules |

## Links

- npm: https://www.npmjs.com/package/multipleable-slider
- Repository: https://github.com/liuyan5258/multipleable-slider
- Homepage: https://github.com/liuyan5258/multipleable-slider#readme
- Issues: https://github.com/liuyan5258/multipleable-slider/issues
- npm.io page: https://npm.io/package/multipleable-slider

## Alternatives

- [adhdev](https://npm.io/package/adhdev.md) — 11.1K weekly downloads
- [react-slide-button](https://npm.io/package/react-slide-button.md) — 310 weekly downloads
- [better](https://npm.io/package/better.md) — 42 weekly downloads
- [react-native-swipe-image](https://npm.io/package/react-native-swipe-image.md) — 22 weekly downloads
- [nl.fokkezb.pulltorefresh](https://npm.io/package/nl.fokkezb.pulltorefresh.md) — 11 weekly downloads

## Recent versions

- 1.1.2 (latest) — 2018-01-20
- 1.1.1 — 2018-01-19
- 1.1.0 — 2017-06-12
- 1.0.0 — 2017-06-11

## README

# Slider

> Start from [rollup-starter-project](https://github.com/rollup/rollup-starter-project)

## Demo

![multipleable-slider](http://os8ri8oj4.bkt.clouddn.com/slider.gif)

## Usage

```shell
npm i --save-dev multipleable-slider
# If you can not install, please try
npm --registry=https://registry.npm.taobao.org install --save-dev multipleable-slider
```

```js
import slider from 'multipleable-slider'

new slider({
  parentContainer: '.m-slider2',
  sliderChildrens: ['.carouse-news ul'],
  sliderBtnNode: '.carouse-dots',
  isAutoPlay: true,
  distance: 0.2
})
```

## APIs

|Property|Type|Default|Description|
|:-------|:---|:------|:----------|
|parentContainer|String|'.slider-container'|Target element to listen touch events on. |
|sliderChildrens|String[]|['.slider-wrap']|CSS class name of slide, parentContainer can control two slider, For example ['.slider-wrap1', '.slider-wrap2']
|sliderBtnNode|String||String with CSS selector or HTML element of the container with pagination. If empty disply none|
|isAutoPlay|boolean|false|Whether to turn on autoplay|
|delayTime|number|500|Delay between transitions (in ms)|
|interval|number|5000|Auto-play interval|
|distance|float|0.3|Threshold value in (0 ~ 1). If "touch distance" will be lower than (parentContainer.clientWidth * distance) then slider will not move|
|direction|String|'left'|Auto play direction, currently only supports left|
|isLoopPlay|boolean|true|Whether to loop|  


|参数|类型|默认值|说明|
|:--|:---|:---|:---|
|parentContainer|String|'.slider-container'|slider控制器容器，监听slider的touch事件|
|sliderChildrens|String[]|['.slider-wrap']|轮播图容器，数组类型，一个控制器可以控制多个轮播，比如['.slider-wrap1', '.slider-wrap2']|
|sliderBtnNode|String||轮播导航，没有或为空则不显示|
|isAutoPlay|boolean|false|是否自动播放，true: 自动播放 false: 不自动播放|
|delayTime|number|500|滑动一屏的过渡时间|
|interval|number|5000|自动播放的间隔|
|distance|float|0.3|滑动阈值比例，如果滑动距离低于parentContainer的宽度的0.3倍，则不移动|
|direction|String|'left'|自动播放的方向，目前只支持left|
|isLoopPlay|boolean|true|是否循环播放，true: 循环播放 false: 不循环播放|

---
_Source: https://npm.io/package/multipleable-slider · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
