Skip to content

useParallax ​

Category
Sensors

Hook to help create parallax effect

typescript
import { useParallax } from '@siberiacancode/reactuse';

Usage ​

typescript
const { roll, tilt, source } = useParallax(target);

Demo ​

Api ​

Parameters

NameTypeDefaultNote
targetTarget-The target element for the parallax effect
optionsUseParallaxOptions-The options for the parallax effect

Parameters

NameTypeDefaultNote
optionsUseParallaxOptions-The options for the parallax effect

Contributors ​

Source • Demo