# left-wrapper

> left-wrapper - 移动端H5 左滑插件

Latest version **0.1.0** (published 2019-07-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install left-wrapper
pnpm add left-wrapper
yarn add left-wrapper
bun add left-wrapper
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2019-07-18 |
| First published | 2019-07-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=6.0.0 |
| Dependencies | 0 |
| Unpacked size | 79.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | xujunjie |
| Maintainers | qsz |

## Links

- npm: https://www.npmjs.com/package/left-wrapper
- Repository: https://github.com/qsz/left-wrapper
- Homepage: https://github.com/qsz/left-wrapper#readme
- Issues: https://github.com/qsz/left-wrapper/issues
- npm.io page: https://npm.io/package/left-wrapper

## Recent versions

- 0.1.0 (latest) — 2019-07-18

## README

# left-wrapper - 移动端H5 左滑插件

## demo

```html
<style>
 * {
    margin: 0;
    padding: 0;
}  
.slide {
    height: 200px;
    width: 100%;
}
.left-slide {
    color: white;
    font-size: 50px;
    background-color: red;
}
.right-slide {
    background-color: green;
}
.right-slide p {
    color: white;
    font-size: 50px;
    float: right;
}
</style>   
<body>
  <div id='wrapper' class='left-wraper'>
     <div class="left-slide slide"><p>左滑部分</p></div>
     <div class="right-slide slide"><p>删除</p></div>
  </div>
</body>

<script>
const wrapper = document.getElementById('wrapper');
new LeftWrapper(wrapper, {
    slideWidth: 100
});
</script>

```

## 参数

* wrapper：HTMLElement对象
* opts：配置
  * slideWidth    左滑最大值，number类型
  * duration       滑动结束后动画持续时间，单位ms。非必填，默认300

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