Home
Docs
InfinityFX
©Copyright2016-2026 InfinityFX. All rights reserved.
InfinityFX®
Lively
v5.0.0
Getting started
Components
Animate
LayoutGroup
TextAnimation
ViewAnimation
Hooks
useAudio
useHover
useLink
useReducedMotion
useScroll
useSpring
useTap
useViewport
useVisible
Links
v4 docs
llms.txt

ViewAnimation

A preset component that wraps an element and automatically triggers enter and exit animations based on its visibility in the viewport.

Importing

1
import { ViewAnimation } from '@infinityfx/lively/presets';

Usage

Properties

children:React.ReactElement

Single React child element to monitor and animate upon viewport entry/exit.

enter:ClipOptions | Clip

Animation configuration played when the element enters the viewport.

exit?:ClipOptions | Clip

Animation configuration played when the element exits the viewport.

maxEnters?:number = 1

Maximum number of times the enter animation will trigger.

maxExits?:number = 0

Maximum number of times the exit animation will trigger.