iOS-style swipeout buttons that appear from behind a component
npm install --save react-native-swipeout
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-swipeout')
// Buttons
var swipeoutBtns = [
{
text: 'Button'
}
]
// Swipeout component
<Swipeout right={swipeoutBtns}>
<View>
<Text>Swipe me left</Text>
</View>
</Swipeout>
Prop | Type | Optional | Default | Description |
---|---|---|---|---|
autoClose | bool | Yes | false | auto close on button press |
autoCloseAfterPressButton | bool | Yes | true | close after press button |
backgroundColor | string | Yes | '#dbddde' | |
close | bool | Yes | close swipeout | |
left | array | Yes | [] | swipeout buttons on left |
onOpen | func | Yes | ||
right | array | Yes | [] | swipeout buttons on right |
scroll | func | Yes | prevent parent scroll | |
openedRightCallback | func | Yes | when right open | |
closeSwipeoutCallback | func | Yes | when close | |
openedLeftCallback | func | Yes | when left open |
Prop | Type | Optional | Default | Description |
---|---|---|---|---|
styleButton | object | Yes | {} | style for button |
styleText | object | Yes | {} | style for button text |
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 |