<Composition> defines the component, width, height, fps and duration of a renderable video.
It normally is placed in the src/Root.tsx file.
Default Props
PassdefaultProps to provide initial values for your component.Values must be JSON-serializable (
Date, Map, Set, and staticFile() are supported).
type declarations for props rather than interface to ensure defaultProps type safety.
Folders
Use<Folder> to organize compositions in the sidebar.Folder names can only contain letters, numbers, and hyphens.
Stills
Use<Still> for single-frame images. It does not require durationInFrames or fps.
Calculate Metadata
UsecalculateMetadata to make dimensions, duration, or props dynamic based on data.
props, durationInFrames, width, height, fps, and codec-related defaults. It runs once before rendering begins.