react-native-swipeable-up-down

0.0.3 • Public • Published

React Native Swipeable Up Down

Installation

yarn add react-native-swipeable-up-down

Note: Progress indicators has been broken out to a separate component; react-native-interactable. To use them, please follow installation instructions for that package.

Usage

import SwipeableUpDown from 'react-native-swipeable-up-down';

<SwipeableUpDown
	isList
	childrenRef={this.refs.flatListRef}
	ref='swipeableBoxRef'
>
	<FlatList
		ref='flatListRef'
		data={[{key: 'a'}, {key: 'b'}]}
		renderItem={({item}) => <Text>{item.key}</Text>}
	/>
</SwipeableBox>

Properties

Prop Description Default
snapPoints Related RN Interactable . true
boundaries Related RN Interactable. true
initialPosition Related RN Interactable. true
isList To handle scrollview in List, so if you're using List (FlatList, ScrollView,...) should set value is true. false
childrenRef If you're using list in SwipeableBox, you need pass your Reference of List. None
onStateChange It's call when box show or hide. true

Methods

this.refs.swipeableBoxRef.show()

this.refs.swipeableBoxRef.hide()

this.refs.swipeableBoxRef.isVisble()

License

This module is MIT licensed

Package Sidebar

Install

npm i react-native-swipeable-up-down

Weekly Downloads

1

Version

0.0.3

License

MIT

Unpacked Size

1.07 MB

Total Files

122

Last publish

Collaborators

  • minhchienwikipedia