UNPKG

react-just-parallax

Version:

React library for scroll and mousemove parallax effect ✨ Open source, production-ready

34 lines (30 loc) 1.12 kB
import React from 'react'; interface MouseParallaxProps { strength?: number; children?: React.ReactNode; parallaxContainerRef?: React.MutableRefObject<any> | null; scrollContainerRef?: React.MutableRefObject<any> | null; shouldResetPosition?: boolean; enableOnTouchDevice?: boolean; lerpEase?: number; isAbsolutelyPositioned?: boolean; zIndex?: number | null; shouldPause?: boolean; } declare const MouseParallax: (props: MouseParallaxProps) => JSX.Element; interface ScrollParallaxProps { strength?: number; children?: React.ReactNode; scrollContainerRef?: React.MutableRefObject<any> | null; enableOnTouchDevice?: boolean; lerpEase?: number; isHorizontal?: boolean; isAbsolutelyPositioned?: boolean; zIndex?: number | null; shouldPause?: boolean; } declare type ScrollParallaxHandle = { updateValues: () => void; }; declare const ScrollParallax: React.ForwardRefExoticComponent<ScrollParallaxProps & React.RefAttributes<ScrollParallaxHandle>>; export { MouseParallax, ScrollParallax, ScrollParallaxHandle };