fastui-carousel
v0.0.6
Published
Carousel component built with React Native
Downloads
27
Readme
fastui-carousel
A carousel component built with React Native . All components as seen in fastui.
Demo
Install
npm install fastui-carousel
Example
'use strict';
import React, {AppRegistry, StyleSheet, Dimensions, View, Image, StatusBarIOS} from 'react-native';
var Carousel = require('./fastui-carousel');
var CarouselDemo = React.createClass({
componentWillMount() {
StatusBarIOS.setHidden(true)
},
render() {
return (
<View style={styles.container}>
<Carousel>
<View style={styles.page}>
<Image
style={styles.img}
source={{uri: 'http://7xkm02.com1.z0.glb.clouddn.com/page1.png'}}
/>
</View>
<View style={styles.page}>
<Image
style={styles.img}
source={{uri: 'http://7xkm02.com1.z0.glb.clouddn.com/page2.png'}}
/>
</View>
<View style={styles.page}>
<Image
style={styles.img}
source={{uri: 'http://7xkm02.com1.z0.glb.clouddn.com/page3.png'}}
/>
</View>
</Carousel>
</View>
);
}
});
const styles = StyleSheet.create({
container: {
flex: 1,
},
page: {
width: Dimensions.get('window').width,
flex: 1,
alignItems: 'stretch',
},
img: {
flex:1,
},
});
AppRegistry.registerComponent('CarouselDemo', () => CarouselDemo);
More Options
showPagination = {true}
paginationSize = {16}
paginationSpace = {20}
paginationBottomOffset = {50}
paginationColor = '#fff'
activePaginationColor = '#aaa'