1.1.2 • Published 7 years ago
react-easy-parallax v1.1.2
react-easy-parallax
| Wrap your JSX in a MouseParallax or ScrollParallax component to easily apply parallax effect
Install
npm install --save react-easy-parallaxUsage
There's two components to react-easy-parallax. You don't need to include both, import the one you want.
import { MouseParallax, ScrollParallax } from 'react-easy-parallax'MouseParallax
This takes two props:
- noFollow
- size
noFollow
This makes the element(s) wrapped in the MouseParallax component move in the opposite direction to the mouse.
size
Adjust the size of the parallax movement
What
Keep the number between
1and10otherwise it will break/be too large.Larger number = larger movement
Default is set to 2
ScrollParallax
This takes one prop:
- size
size
Adjust the size of the parallax movement
What
Keep the number between
1and10otherwise it will break.Smaller number = larger movement
Default is set to 5