Skip to content

silentcloud/react-native-swipeout

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 

Repository files navigation

Note: The fork has been deprecated, because I am one of collaborators to dancormier/react-native-swipeout.

forked from dancormier/react-native-swipeout, fixed bugs and republished

react-native-swipe-out

iOS-style swipeout buttons that appear from behind a component

swipeout preview

Installation

npm install --save react-native-swipe-out

Usage example

See example/index.ios.js for a more detailed example. See the Wiki usage tips. To use swipeout behind a iOS-style listitem, try 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

About

iOS-style swipeout buttons behind component

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published