Version: 3.0.0-next.40

PresenceTransition

PresenceTransition provides a declarative API to add entry and exit transitions.

Fade#

ScaleFade#

Props#

Name Type Description Default
onTransitionComplete (s: "entered" | "exited") => any Callback invoked when transition is completed -
initial ISupportedTransitions Styles before the transition starts -
animate ITransitionStyleProps Entry animation styles -
exit ITransitionStyleProps Exit animation styles -
visible boolean Determines whether to start the animation false
as any Accepts a Component to be rendered as Wrapper. Defaults to `View` -

PresenceTransition implements View

ISupportedTransitions#

interface ISupportedTransitions {
opacity?: number;
translateY?: number;
translateX?: number;
scale?: number;
scaleX?: number;
scaleY?: number;
rotate?: string;
}

ITransitionStyleProps#

interface ITransitionStyleProps extends ISupportedTransitions {
transition?: {
type?: 'timing' | 'spring',
easing?: (value: number) => number,
overshootClamping?: boolean,
restDisplacementThreshold?: number,
restSpeedThreshold?: number,
velocity?: number | { x: number, y: number },
bounciness?: number,
speed?: number,
tension?: number,
friction?: number,
stiffness?: number,
mass?: number,
damping?: number,
delay?: number,
duration?: number,
useNativeDriver?: boolean,
};
}