Parallax elements based on mousemovement inspired by react-springy-parallax
npm install react-parallax-mousemoveClone repo
`````
git clone https://github.com/adamwade2384/react-parallax-mousemove.git
Install dependencies
npm install or yarn install
Start development server
npm start or yarn start
Runs the demo app in development mode.
Open http://localhost:3000 to view it in the browser.
Is located inside src/demo directory, here you can test your library while developing
import ParallaxMousemove from 'react-parallax-mousemove'
The library provides you with two (2) components - A container component and layer component(s). The container component ParallaxMousemove takes the ParallaxMousemove.Layer component as children.
```
The props for each component is as follows:
| prop | type | required |
| ------ | ------ | -----: |
| containerStyle | Obj | optional |
| fullHeight | Bool | optional |
| prop | type | required |
| ------ | ------ | -----: |
| config | Obj | required |
| option | type | description |
| ------ | ------ | ----- |
| xFactor | Int | A percentage of the mousemove distance from the center of the screen on the x axis |
| yFactor | Int | A percentage of the mousemove distance from the center of the screen on the y axis |
| springSettings | Obj | The spring configuration settings for react-motion. |
| option | type | description |
| ------ | ------ | ----- |
| stiffness | Int | The response and speed of layers in relation to mouse movements |
| damping | Int | The spring and rebound of layers in relation to mouse movements |