@khorark/react-native-swipeable-flatlist
v0.2.0
Published
A simple and fast react-native swipeable flastlist component
Maintainers
Readme
React Native Swipeable FlatList 
A simple and fast React Native swipeble flatlist component. Supports both iOS and Android.
Installation
npm i --save @khorark/react-native-swipeable-flatlistUsage
import SwipebleList from '@khorark/react-native-swipeable-flatlist';
function MyListItem() {
return (
<View>
<SwipebleList
data={[1, 2, 3]}
renderItem={this.renderItem}
keyExtractor={this.keyExtractor}
leftColor={'green'}
rightColor={'blue'}
onSwipeLeft={this.onSwipe}
onSwipeRight={this.onSwipe}
/>
</View>
);
}Props
| prop | type | default | description |
| --------------------- | ---------- | ------------------------ | -------------------------------------------------------------------- |
| swipeDistanceActive | integer | 0.3 | swipeable distance for active swipe |
| leftView | renderable | null | (optional) left content visible during pull action |
| rightView | renderable | null | (optional) right content visible during pull action |
| leftColor | string | rgba(146, 149, 181, 0.7) | (optional) background color for left content |
| rightColor | string | rgba(132, 147, 158, 0.7) | (optional) background color for left content |
| onSwipeLeft | function | null | (optional) user has swiped beyond swipeDistanceActive and released |
| onSwipeRight | function | null | (optional) user has swiped beyond swipeDistanceActive and released |
Example
License
MIT
