fade()
A simple fade animation. The incoming scene fades in over the outgoing scene. By default, the outgoing scene does not change, so this works only if the incoming scene is fully opaque. Set shouldFadeOutExitingScene to also fade out the outgoing scene.
Example
FadeTransition.tsximport {linearTiming ,TransitionSeries } from "@remotion/transitions"; import {fade } from "@remotion/transitions/fade"; constBasicTransition = () => { return ( <TransitionSeries > <TransitionSeries .Sequence durationInFrames ={40}> <Letter color ="#0b84f3">A</Letter > </TransitionSeries .Sequence > <TransitionSeries .Transition presentation ={fade ()}timing ={linearTiming ({durationInFrames : 30 })} /> <TransitionSeries .Sequence durationInFrames ={60}> <Letter color ="pink">B</Letter > </TransitionSeries .Sequence > </TransitionSeries > ); };
API
An object which takes:
enterStyle?v4.0.84
The style of the container element when the scene is entering.
exitStyle?v4.0.84
The style of the container element when the scene is exiting.
shouldFadeOutExitingScene?v4.0.166
Whether the exiting scene should fade out or not. Default false.
The default is false because if both the entering and exiting scene are semi-opaque, the whole scene will be semi-opaque, which will make the content underneath shine through.
We recommend keeping this set to false for transitioning between fully opaque scenes.
If the scenes are not fully covered (like fading between overlays), we recommend setting this to true.
Compatibility
| Browsers | Environments | |||||
|---|---|---|---|---|---|---|
Chrome | Firefox | Safari | ||||