React Native Carousel with support for both iOS and Android.
npm install react-native-carousel-control --save
import Carousel from "react-native-carousel-control";
//...
<Carousel>
<Text>Hello</Text>
<Text>World!</Text>
<Text>From carousel</Text>
</Carousel>
The carousel has the following format:
------------
| v--- page
|- ---- -|
| | | | | |
| | | | | |
| | | | | |
|- ---- -|
|^-- sneak |
| ^--- gap
------------
Type: PropTypes.object
The style that will be applied on the page. For example:
<Carousel pageStyle={ {backgroundColor: "white", borderRadius: 5} }>
Type: PropTypes.number
The width of the page. By default it will adjust to deviceWidth - 100
.
Type: PropTypes.number
The index of the initial page. The first page is 0
.
Type: PropTypes.func
This function will be called every time the page changes.
Type: PropTypes.number
How much of the adjacent pages will display (see format above).
The MIT License (MIT)
Copyright (c) 2016 Gustavo Machado [email protected].