Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ertrzyiks/react-native-icarousel
https://github.com/ertrzyiks/react-native-icarousel
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/ertrzyiks/react-native-icarousel
- Owner: ertrzyiks
- License: mit
- Created: 2015-10-07T10:58:02.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-07T14:46:43.000Z (over 9 years ago)
- Last Synced: 2024-12-07T19:36:05.282Z (about 1 month ago)
- Language: Objective-C
- Size: 191 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-native-icarousel
Binding between [react-native](https://github.com/facebook/react-native)
and [iCarousel](https://github.com/nicklockwood/iCarousel).## Installation
* Install package
```
npm install ertrzyiks/react-native-icarousel --save
```* Install iCarousel Pod
* Libraries->Add Files to "", select ``./node_modules/react-native-icarousel/ios/ReactNativeICarousel.xcodeproj`
* Drag and drop iCarousel pod (i know there must be better way!) to ReactNativeICarousel Library
* In project `Build Phases`, in Link Binary With Libraries section add libReactNativeICarousel.a## Usage
See full example at [ertrzyiks/react-native-icarousel-example](https://github.com/ertrzyiks/react-native-icarousel-example)
```
var Carousel = require('react-native-icarousel');var styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF'
}
});var CarouselTest = React.createClass({
render: function() {
return (
One!
Two!
Three!
Four!
Five!
);
}
});
```## Supported properties
| Prop Name | Type | |
|------------------|-----------------------------|---------------------------------------|
| type | Enum (Carousel.Type.*) | Type of carousel |
| vertical | Bool | Set carousel to vertical |
| scrollEnabled | Bool | Set false to disable carousel |
| bounces | Bool | Set true to enable bouncing |
| bounceDistance | Number | |
| perspective | Number | Defaults to (-1 / 500) |
| scrollSpeed | Number | Defaults to 1.0 |
| decelerationRate | Number | Kind of friction? |See [official docs](https://github.com/nicklockwood/iCarousel#properties) for more details