react-native-swiper-deck

Swipable deck that allows for vertical and horizontal swiping


Keywords
deck, swipe, swipable, react, native, component
License
MIT
Install
npm install react-native-swiper-deck@1.0.4-rc4

Documentation

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

  1. npm install react-native-swiper-deck or yarn add react-native-swiper-deck

  2. Import the package into the screen you wish to use the deck:

example

import Deck from 'react-native-swiper-deck';
  1. Pass the component into a view

example

<Deck />
  1. 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.