🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

react-parallax-video

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-parallax-video

A React Component for parallax effect. With a small video support

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

react-parallax

A react component for simple parallax effect With a primitive video parallax effect

React 0.14.0 or higher is required since version 0.2.0

Install

npm install react-parallax --save-dev

Monkey patch for using video via react-parallax

Demo

Usage

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

var TheContainer = React.createClass({
  render: function () {
    return (
      <div>
      	<Parallax bgImage="assets/1.jpg" strength={300}>
			<h1>first parallax section</h1>
		</Parallax>
		<Parallax bgImage="assets/2.jpg">
			<br/>
			<h1>second parallax </h1>
			<br/>
		</Parallax>
      </div>
    )
  }
});

Props

  • bgImage: path to the background image that makes parallax effect visible - (type: String)
  • bgColor: css value for a background color (visible only if bgImage is NOT set), eg.: #ddd, yellow, rgb(34,21,125) - (type: String)
  • strength: parallax effect strength (in pixel), default 100. this will define the amount of pixels the background image is translated - (type: Number)
  • blur: pixel value for background image blur, default: 0 - (type: Number)
  • disabled: turns off parallax effect if set to true, default: false - (type: Boolean)

Children

The children are used to display any content inside the react-parallax component

Development

Initial set up, run:

npm install

For watch on files, live reload, JSX transpiling and browserify, run:

grunt

Port on Windows is 80, 8080 on all other OS by default. Can be set with option -port=8080

License

MIT

Keywords

react

FAQs

Package last updated on 22 Oct 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