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 = 1Maximum number of times the enter animation will trigger.
maxExits?:
number = 0Maximum number of times the exit animation will trigger.