Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

github.com/oblador/react-native-parallax

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/oblador/react-native-parallax


Version published
Created
Source

react-native-parallax

NOTE: This module requires React Native 0.8+

Installation

npm install --save react-native-parallax

Usage

Note: Parallax.Image elements must be direct descendants of Parallax.ScrollView

var Parallax = require('react-native-parallax');

var ParallaxView = React.createClass({
  render: function() {
    return (
      <Parallax.ScrollView>
        <Parallax.Image
          style={{ height: 200 }}
          overlayStyle={{ backgroundColor: 'rgba(0,0,0,0.3)'}}
          source={{ uri: 'http://loremflickr.com/640/480' }}
        >
          <Text>This is optional overlay content</Text>
        </Parallax.Image>
      </Parallax.ScrollView>
    );
  },
});

Parallax.ScrollView Properties

Any ScrollView property and the following:

PropDescriptionDefault
scrollViewComponentWhat underlying component to compose around, must be ScrollView compatible.ScrollView

Parallax.Image Properties

Any Image property and the following:

PropDescriptionDefault
onPressFired when element is tapped.None
imageStyleOptional image style, width and height styles are set automatically.None
overlayStyleOptional overlay style, might be useful if you want a shaded background for better readability.None
parallaxFactorThe speed of the parallax effect. Larger values require taller images or they will be zoomed in.0.2

Demo

Demo

Example

Check full example in the Example folder.

License

MIT License. © Joel Arvidsson

FAQs

Package last updated on 21 Dec 2015

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc