Skip to main content

bookFlip()v4.0.466

A presentation that bends the outgoing and incoming scenes into a shaded page-turning book flip.

warning

This presentation is built with HTML-in-canvas and requires Google Chrome with chrome://flags/#canvas-draw-element enabled. It does not work in Firefox or Safari.

Example

BookFlipTransition.tsx
import {linearTiming, TransitionSeries} from '@remotion/transitions'; import {bookFlip} from '@remotion/transitions/book-flip'; const BasicTransition = () => { return ( <TransitionSeries> <TransitionSeries.Sequence durationInFrames={40}> <Letter color="#0b84f3">A</Letter> </TransitionSeries.Sequence> <TransitionSeries.Transition presentation={bookFlip({})} timing={linearTiming({durationInFrames: 30})} /> <TransitionSeries.Sequence durationInFrames={60}> <Letter color="pink">B</Letter> </TransitionSeries.Sequence> </TransitionSeries> ); };

API

Accepts an object with the following options:

direction?

Controls which edge the page turn starts from.

Accepted values are 'from-left', 'from-right', 'from-top', and 'from-bottom'.

Defaults to 'from-right'.

Compatibility

BrowsersServersEnvironments
Chrome
Firefox
Safari
Node.js
Bun
Serverless Functions

For Preview, Chrome with the chrome://flags/#canvas-draw-element flag enabled is required.

Credits

The fragment shader is adapted from the BookFlip GL Transition by hong, licensed under MIT.

See also