# react-swipeout

> swipeout component for react

Latest version **1.1.1** (published 2016-06-13) · 0 weekly downloads

## Install

```sh
npm install react-swipeout
pnpm add react-swipeout
yarn add react-swipeout
bun add react-swipeout
```

## 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.1 |
| Published | 2016-06-13 |
| First published | 2016-06-02 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | rjmuqiang@gmail.com |
| Maintainers | silentcloud |
| Keywords | react, react-component, swipeout, swipe delete |

## Links

- npm: https://www.npmjs.com/package/react-swipeout
- Repository: https://github.com/silentcloud/react-swipeout
- Issues: https://github.com/silentcloud/react-swipeout/issues
- npm.io page: https://npm.io/package/react-swipeout

## Dependencies (1)

- [react-hammerjs](https://npm.io/package/react-hammerjs.md) ^0.4.6

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2016-06-13
- 1.1.0 — 2016-06-13
- 1.0.0 — 2016-06-02

## README

# react-swipeout
---

iOS-style swipeout buttons that appear from behind a component

[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]

[npm-image]: http://img.shields.io/npm/v/react-swipeout.svg?style=flat-square
[npm-url]: http://npmjs.org/package/react-swipeout
[travis-image]: https://img.shields.io/travis/silentcloud/react-swipeout.svg?style=flat-square
[travis-url]: https://travis-ci.org/silentcloud/react-swipeout
[coveralls-image]: https://img.shields.io/coveralls/silentcloud/react-swipeout.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/silentcloud/react-swipeout?branch=master

## Screenshots

![swipeout](http://silentcloud.github.io/upload/swipeout.gif)

## Installation

`npm install --save react-swipeout`

## Development

```
npm install
npm start
```

## Example

- local: http://localhost:8000/examples/
- online: http://silentcloud.github.io/react-swipeout/examples/simple.html

## Usage

```js
import Swipeout from 'Swipeout';

<Swipeout 
  left={[
    { text: 'reply',  onPress:() => {console.log('reply')}, style: {backgroundColor: 'orange', color: 'white'} }
  ]} 
  right=[{
    { text: 'delete',  onPress:() => {console.log('delete')}, style: {backgroundColor: 'red', color: 'white'} }
  }] 
  onOpen={() => console.log('open')}
  onClose={() => console.log('close')}
>
  <div style={{height: 44}}> swipeout demo </div>
</Swipeout>

```

## API

### props

| 属性        | 说明                   | 类型   | 默认值     |
|-------------|------------------------|--------|------------|
| prefixCls       | className prefix     | String | `rc-swipeout` |
| style       | swipeout style      | Object | `` |
| left       | swipeout buttons on left      | Array | `null` |
| right       | swipeout buttons on right      | Array | `null` |
| autoClose       | auto close on button press   | Boolean | `function() {}` |
| onOpen       |       | Function | `function() {}` |
| onClose       |       | Function | `function() {}` |
| disabled       |   disabled swipeout    | Boolean | `false` |

### button props

| 属性        | 说明                   | 类型   | 默认值     |
|-------------|------------------------|--------|------------|
| text       | button text     | String | `Click` |
| style       | button style     | Object | `` |
| onPress       | button press function      | Function | `function() {}` |

## Test Case

```
npm test
npm run chrome-test
```

## Coverage

```
npm run coverage
```

open coverage/ dir

## License

react-swipeout is released under the MIT license.

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