react-native-slides
    Overview
    Documentation
    Tutorials
    Chat
    Insights
    Code
    Dependencies
    Contributors
    Jobs

react-native-slides

Looped carousel for React Native

0.0.3  •  Updated 4 years ago  •  by Phil Rukin  •  MIT License

Looped carousel for React Native

Based on react-native framework by Facebook.

Demo

Install

$ npm install react-native-looped-carousel --save

Usage

'use strict';

var React = require('react-native');
var Carousel = require('react-native-looped-carousel');
var Dimensions = require('Dimensions');
var {width, height} = Dimensions.get('window');
var {
  AppRegistry,
  StyleSheet,
  Text,
  View
} = React;

var carouselTest = React.createClass({
  getInitialState: function() {
    return {
      size: {width: width, height: height}
    };
  },
  _onLayoutDidChange: function(e) {
    var layout = e.nativeEvent.layout;
    this.setState({size: {width: layout.width, height: layout.height}});
  },
  render: function() {
    return (
      <View style={{flex: 1}} onLayout={this._onLayoutDidChange}>
        <Carousel delay={500} style={this.state.size}>
            <View style={[{backgroundColor:'#BADA55'}, this.state.size]}/>
            <View style={[{backgroundColor:'red'}, this.state.size]}/>
            <View style={[{backgroundColor:'blue'}, this.state.size]}/>
        </Carousel>
      </View>
    );
  }
});

AppRegistry.registerComponent('carouselTest', () => carouselTest);

Used in


More on react-native here: http://facebook.github.io/react-native/docs/getting-started.html#content

Popularity

Maintenance

Development

Last ver 4 years ago
Created 4 years ago
Last commit 2 years ago
6 days between commits

Technology

Node version: 5.5.0
0 unpacked

Compliance

MIT License
OSI Approved
0 vulnerabilities

Contributors

37 contributors
Phil
Maintainer, 88 commits, 69 merges, 5 PRs
dependabot[bot]
37 commits
Sergey Pronin
Maintainer, 24 commits, 8 merges
Works at App in the Air
Viktor Seč
Maintainer, 10 commits, 8 merges, 10 PRs
Works at vacuumlabs
Sebastian Gronewold
12 commits
Ryan Homer
Maintainer, 7 commits, 1 merges, 2 PRs

Tags

react
native
carousel
looped
Openbase helps developers choose among and use millions of open-source packages, so they can build amazing products faster.
FacebookTwitterLinkedIn
© 2020 Devstore, Inc.