How to slide in and out from the bottom in React Native?

前端 未结 3 2049
天命终不由人
天命终不由人 2020-12-14 08:30

In React Native iOS, I would like to slide in and out of a like in the following picture.

In the following example, when a button is pressed, the Payment Inf

3条回答
  •  再見小時候
    2020-12-14 08:37

    After a quite long search I found very good library called react-native-swipe-down with MIT licence. It will help you make a slider with no effort.

    I Hope this library help you out.

    import SwipeUpDown from 'react-native-swipe-up-down';
    
    } // Pass props component when collapsed
        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
    />
    

提交回复
热议问题