2.2.2 • Published 7 years ago

react-gsap-parallax v2.2.2

Weekly downloads
23
License
ISC
Repository
github
Last release
7 years ago

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

7 years ago

2.2.1

7 years ago

2.2.0

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

2.0.8

7 years ago

2.0.7

7 years ago

2.0.6

7 years ago

2.0.5

7 years ago

2.0.4

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.3.0

7 years ago

1.2.7

7 years ago

1.2.6

7 years ago

1.2.5

7 years ago

1.2.4

7 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago