useParallax ​
Hook to help create parallax effect
typescript
import { useParallax } from '@siberiacancode/reactuse';
Usage ​
typescript
const { roll, tilt, source } = useParallax(target);
Demo ​
Api ​
Parameters
Name | Type | Default | Note |
---|---|---|---|
target | Target | - | The target element for the parallax effect |
options | UseParallaxOptions | - | The options for the parallax effect |
Returns
Parameters
Name | Type | Default | Note |
---|---|---|---|
options | UseParallaxOptions | - | The options for the parallax effect |