You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

react-gsap-parallax

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-gsap-parallax

react-gsap-parallax React component

2.2.2
latest
Source
npmnpm
Version published
Weekly downloads
11
-67.65%
Maintainers
1
Weekly downloads
 
Created
Source

react-gsap-parallax

  • codepen
  • demo
  • github
  • npm

to run the demos, clone this, then

$ npm install
$ npm run start

run localStorage.debug = 'react-gsap-parallax*' in your console to see logging

ParallaxContainer

static propTypes = {
  children: React.PropTypes.node.isRequired,
  className: React.PropTypes.string,
  id: React.PropTypes.string,
  style: React.PropTypes.object,
  children: React.PropTypes.node.isRequired,
  top: React.PropTypes.number,
  height: React.PropTypes.number.isRequired,
  scrolljack: React.PropTypes.bool,
  onScroll: React.PropTypes.func,
  scrollableAncestor: React.PropTypes.node
}
static defaultProps = {
  scrolljack: false
}

If scrolljack is set, the scrollhandler will use TimelineMax.tweenTo rather than TimelineMax.seek.

The parallax container can be positioned down the page--not necessarily at the top. Use the top and height props to control its position.

Parallax

static propTypes = {
  children: React.PropTypes.node.isRequired,
  className: React.PropTypes.string,
  id: React.PropTypes.string,
  keyframes: React.PropTypes.object.isRequired,
  style: React.PropTypes.object,
}
static defaultProps = {}

Keyframes is an object with parseIntable keys betwene 0 and 100, and values which are passed as 'vars' to TweenLite.to.

keyframes={{
'0%': {top: '100vh', left: 0, fontSize: '12px'},
'100%': {top: '0vh', left: 0, fontSize: '36px'}
}}

Keywords

react-component

FAQs

Package last updated on 12 Jun 2017

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