New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-looped-carousel

Package Overview
Dependencies
Maintainers
2
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-looped-carousel

Looped carousel for React Native

0.0.12
Source
npm
Version published
Weekly downloads
347
-1.42%
Maintainers
2
Weekly downloads
 
Created
Source

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

Keywords

react

FAQs

Package last updated on 10 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts