Animated Content

Content to Animate

Customize Animated Content

Distance150px
Duration1.2s
Scale1.1
Initial Opacity0.2
Threshold0.2
Delay0.3s

Props

PropertyTypeDefaultDescription
childrenReact.ReactNode-The content to animate when scrolled into view.
containerElement | string | nullnullThe scroll container element. If null, uses the viewport.
distancenumber100The distance the element moves from when animating in.
directionvertical | horizontalverticalThe direction of the animation movement.
reversebooleanfalseWhether to reverse the animation direction.
durationnumber0.8The duration of the animation in seconds.
easestringpower3.outThe easing function for the animation.
initialOpacitynumber0The initial opacity of the element before animation.
animateOpacitybooleantrueWhether to animate the opacity along with movement.
scalenumber1The scale factor for the element during animation.
thresholdnumber0.1The visibility threshold to trigger the animation (0-1).
delaynumber0The delay before the animation starts in seconds.
disappearAfternumber0Time after which the element disappears (0 to disable).
disappearDurationnumber0.5Duration of the disappearance animation.
disappearEasestringpower3.inEasing function for the disappearance animation.
onComplete() => void-Callback function triggered when animation completes.
onDisappearanceComplete() => void-Callback function triggered when disappearance completes.
classNamestring""Additional CSS classes for the component.
styleReact.CSSProperties{}Inline styles for the component.

Dependencies

gsap

Created with ❤️ by Cybershoora