'React Native Android Swipe Up

I am making a transportation app and I need a component in React Native that can swipe up when people want to set the location.

How can I make swipe up like in the example image below?

before swipe

after swipe up

Anyone has references or a tutorial like this? Thanks in advance.



Solution 1:[1]

I think you are looking for this library

Installation :

npm install react-native-swipe-up-down --save

Basic Usage

import SwipeUpDown from 'react-native-swipe-up-down';


<SwipeUpDown        
    itemMini={<ItemMini />} // Pass props component when collapsed
    itemFull={<ItemFull />} // Pass props component when show full
    onShowMini={() => console.log('mini')}
    onShowFull={() => console.log('full')}
    onMoveDown={() => console.log('down')}
    onMoveUp={() => console.log('up')}
    disablePressToShow={false} // Press item mini to show full
    style={{ backgroundColor: 'green' }} // style for swipe
/>

Output : this

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Firu