Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 880
Agensi Digital Avatar asked Oct 30 '25 05:10

Agensi Digital


1 Answers

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

like image 123
Firu Avatar answered Nov 02 '25 04:11

Firu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!