When a phase is set, it will change the phase, call render, and wait for onTransitionEnd or onAnimationEnd (depending on listenerProp), then call render again.
listenerProp
string | default 'onTransitionEnd' | optional, one of 'onTransitionEnd' or 'onAnimationEnd'
Set whether phases change on transition or animation end events. Defaults to transition events.
render
function | required
<AnimationPrimitive render={() => <div />} />
The render prop function is called with the following object:
property
category
type
description
phase
state
string
The current phase. Either 'enter' or 'leave'.
phaseActive
state
boolean
Whether this phase is currently running. For example, true if phase was just set to 'enter' and transition is in progress. False when 'enter' transition finishes.
phaseComplete
state
boolean
Whether a transition just finished. True if this state was active and is no longer active.
getContainerProps
prop getter
function
Get the props to put on your container element which will be transitioning. Contains a transitionend/animationend event listener.