Opacity, TranslateX, TranslateY, Scale, Blur.from to to over duration frames:1234567891011<Opacity from={0} to={1} duration={1 * FPS}> <div>Fades in over 1 second</div> </Opacity> <TranslateX from={-140} to={0} duration={0.5 * FPS}> <div>Slides in from the left</div> </TranslateX> <Scale from={0.8} to={1} duration={0.5 * FPS}> <div>Scales up to full size</div> </Scale>
startInFrames: enter animation (offset from section start)startInFrames: exit animation (offset from section end)1234567{/* Enter: slides in at the start */} <TranslateX from={-140} to={0} duration={0.5 * FPS}> {/* Exit: slides out before the section ends */} <TranslateX from={0} to={140} duration={0.5 * FPS} startInFrames={-0.5 * FPS}> <div style={{ fontSize: 72, color: 'white' }}>Title</div> </TranslateX> </TranslateX>
cutInMotion (0-1) to clip the animation at the scene boundary:123456789101112131415# First Scene duration=3s <TranslateX from={-140} to={0} duration={0.7 * FPS}> <TranslateX from={0} to={140} duration={0.7 * FPS} startInFrames={-0.7 * FPS} cutInMotion={0.3}> <div style={{ fontSize: 72, fontWeight: 900, color: 'white' }}>Title</div> </TranslateX> </TranslateX> # Middle Scene duration=3s <TranslateX from={-140} to={0} duration={0.5 * FPS} cutInMotion={0.1}> <TranslateX from={0} to={140} duration={0.6 * FPS} startInFrames={-0.6 * FPS} cutInMotion={0.2}> <div style={{ fontSize: 72, fontWeight: 900, color: 'white' }}>Subtitle</div> </TranslateX> </TranslateX>
<Fill> (full-frame AbsoluteFill). Pass inline to stay
in flow layout (flex, grid):12345<Scale from={0.8} to={1} duration={1 * FPS} inline> <Opacity from={0} to={1} duration={0.7 * FPS} inline> <div style={{ width: 200 }}>Card content</div> </Opacity> </Scale>
% widths/heights on children of inline primitives. The inline wrapper
has no intrinsic size, so percentages resolve to 0. Use px or em instead.12345<TranslateX from={-100} to={0} duration={0.5 * FPS}> <Opacity from={0} to={1} duration={0.5 * FPS}> <div>Slides in and fades in simultaneously</div> </Opacity> </TranslateX>
style to add CSS to the animation wrapper:1234<Scale from={0} to={1} duration={0.8 * FPS} inline style={{ width: '100%', height: '100%', borderRadius: '20%', overflow: 'hidden' }}> <Img src="/photo.png" objectFit="cover" style={{ width: '100%', height: '100%' }} /> </Scale>
easing prop. See the Easing page for all presets.