# react-native-swipe-out

> iOS-style swipeout buttons behind component

Latest version **2.0.14** (published 2017-02-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-swipe-out
pnpm add react-native-swipe-out
yarn add react-native-swipe-out
bun add react-native-swipe-out
```

## 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 | 2.0.14 |
| Published | 2017-02-04 |
| First published | 2016-08-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 32 |
| Author | Dan Cormier |
| Maintainers | silentcloud |
| Keywords | react-native, react-component, ios, swipeout, button, swipe, ui |

## Links

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

## Dependencies (1)

- [react-tween-state](https://npm.io/package/react-tween-state.md) ^0.1.5

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 2.0.14 (latest) — 2017-02-04
- 2.0.13 — 2017-01-03
- 2.0.12 — 2016-08-02
- 2.0.11 — 2016-08-01

## README

forked from [dancormier/react-native-swipeout](https://github.com/dancormier/react-native-swipeout), fixed bugs and republished
---

# react-native-swipe-out
iOS-style swipeout buttons that appear from behind a component

![swipeout preview](http://i.imgur.com/oCQLNFC.gif)

## Installation
```
npm install --save react-native-swipe-out
```

## Usage example

See example/index.ios.js for a more detailed example.
See the [Wiki](https://github.com/dancormier/react-native-swipeout/wiki) usage tips.
To use swipeout behind a iOS-style listitem, try [react-native-listitem](https://github.com/dancormier/react-native-listitem).

```
var Swipeout = require('react-native-swipe-out')

// Buttons
var swipeoutBtns = [
  {
    text: 'Button'
  }
]

// Swipeout component
<Swipeout right={swipeoutBtns}>
  <View>
    <Text>Swipe me left</Text>
  </View>
</Swipeout>

```

## Props

Prop            | Type   | Optional | Default   | Description
--------------- | ------ | -------- | --------- | -----------
autoClose       | bool   | Yes      | false     | auto close on button press
backgroundColor | string | Yes      | '#dbddde' |
close           | bool   | Yes      |           | close swipeout
left            | array  | Yes      | []        | swipeout buttons on left
onOpen          | func   | Yes      |           |
onClose          | func   | Yes      |           |
right           | array  | Yes      | []        | swipeout buttons on right
scroll          | func   | Yes      |           | prevent parent scroll
style           | style  | Yes      |           | style of the container
sensitivity     | number | Yes      | 0         | change the sensitivity of gesture

##### Button props

Prop            | Type   | Optional | Default   | Description
--------------- | ------ | -------- | --------- | -----------
backgroundColor | string | Yes      | '#b6bec0' | background color
color           | string | Yes      | '#ffffff' | text color
component       | string | Yes      | null      | pass custom component to button
onPress         | func   | Yes      | null      | function executed onPress
text            | string | Yes      | 'Click Me'| text
type            | string | Yes      | 'default' | default, primary, secondary
underlayColor   | string | Yes      | null      | button underlay color on press
disabled        | bool   | Yes      | false     | disable button

## To Do

[https://github.com/dancormier/react-native-swipeout/issues](https://github.com/dancormier/react-native-swipeout/issues)

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