react-native-swiper-deck
v1.0.4-rc4
Published
Swipable deck that allows for vertical and horizontal swiping
Downloads
3
Readme
react-native-swiper-deck
react-native swiper component that lets user swipe vertical or horizontal deck of images
How to use:
These directions assume that you have already set up a react-native environment
npm install react-native-swiper-deck or yarn add react-native-swiper-deck
Import the package into the screen you wish to use the deck:
example
import Deck from 'react-native-swiper-deck';
- Pass the component into a view
example
<Deck />
- The Deck takes two props: data (link to your images) and swipeOrientation (horiz or vert) horizontal or vertical
example
<View style={{ justifyContent: 'center' }}>
<Deck
data={[
{ file:'https://www.yourimagelinkgoeshere.jpg'},
{ file:'https://www.yourimagelinkgoeshere.jpg'},
{ file:'https://www.yourimagelinkgoeshere.jpg'},
{ file:'https://www.yourimagelinkgoesherejpg'},
]}
swipeOrientation="horiz"
/>
</View>
That's it! Style your photos in the View and enjoy.