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

react-gsap-parallax

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-gsap-parallax

react-gsap-parallax React component


Version published
Weekly downloads
61
increased by103.33%
Maintainers
1
Weekly downloads
 
Created

react-gsap-parallax

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,
  scrollDistance: React.PropTypes.number.isRequired,
  scrolljack: React.PropTypes.bool,
  style: React.PropTypes.object
}
static defaultProps = {
  scrolljack: false
}

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

If scrolljack is set to something other than 'true', it's value will be passed into the tweenTo function, for example:

scrolljack={{ease: 'Strong'}}

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'}
}}

FAQs

Package last updated on 15 Mar 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