Skip to content

khorark/rn-swipeable-flatlist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Native Swipeable FlatList NPM version

A simple and fast React Native swipeble flatlist component. Supports both iOS and Android.

Installation

npm i --save rn-swipeable-flatlist

Usage

import SwipebleList from 'rn-swipeable-flatlist';

function MyListItem() {
    return (
        <View>
            <SwipebleList
                data={[1, 2, 3]}
                duration={500}
                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
duration integer 300 swipe duration
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

For example used view Example/index.js file.

License

MIT

About

This is swipeable list for use in ReactNative

Resources

Stars

Watchers

Forks

Packages

No packages published