react-native-page-swiper
Page Swiper component for React Native.
Getting Started
Installation
$ npm i react-native-page-swiper --save
Basic Usage
- Install
react-native
first
$ npm i react-native -g
- Initialization of a react-native project
$ react-native init myproject
- Then, edit
myproject/index.ios.js
, like this:
var Swiper = // es6// import Swiper from 'react-native-page-swiper' var React = ;var AppRegistry StyleSheet Text View = React; var styles = StyleSheet var swiper = React AppRegistry
Properties
Prop | Default | Type | Description |
---|---|---|---|
index | 0 |
number |
Index number of initial slide. Changing this number after the component loads will cause the slide to change. |
pager | true |
boolean |
Show pager. |
onPageChange | function |
Callback when page changes. | |
activeDotColor | blue |
string |
CSS color of the dot for the current page. |
threshold | 25 |
number |
Threshold before the swiper captures the pan responder |
Examples
See code in examples.
Questions
Feel free to contact us or create an issue
Inspired by leecade/react-native-swiper & brentvatne/react-native-scrollable-tab-view.