react-native-swipeout
iOS-style swipeout buttons that appear from behind a componentInstallation
npm install --save react-native-swipeout
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.import Swipeout from 'react-native-swipeout';
// 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 disabled | bool | Yes | false | whether to disable the swipeoutleft | array | Yes | | swipeout buttons on left onOpen | func | Yes | | (sectionID, rowId, direction: string) => void onClose | func | Yes | | (sectionID, rowId, direction: string) => void right | array | Yes | | swipeout buttons on right scroll | func | Yes | | prevent parent scroll style | style | Yes | | style of the container sensitivity | number | Yes | 50 | change the sensitivity of gesture buttonWidth | number | Yes | | each button width