Skip to content

<Composition> ​

The video: frame rate, size, background and theme. It ends where its content ends.

tsx
import { Clip, Composition, Title, Track } from "@cutcraft/kit";

export default function Video() {
  return (
    <Composition fps={30} width={960} height={540}>
      <Track id="main">
        <Clip id="shot" src="asset:aurora" in={0} out={4} fit="cover" />
      </Track>
      <Track id="text">
        <Title id="title" anchor="shot" offset={0.4} duration={3.2} size={56}>
          One file, one video
        </Title>
      </Track>
    </Composition>
  );
}

Used in: Product launch · Kinetic type · Data story · Logo reveal · An edit · Captions and key points · the walkthrough · Brand spot in any theme · Multicam highlights · Product demo with zoom-ins · Slideshow with motion · Stats with handles · Talking-head cut · Variants from one file · Vertical clip from a podcast

Props ​

proptypedefaultrequireddescription
idstring"composition"The video's name.
fpsnumber (>0..240)yesFrames per second.
widthinteger (16..8192)yesThe frame's width in pixels.
heightinteger (16..8192)yesThe frame's height in pixels.
sampleRateinteger (8000..192000)48000The soundtrack's samples per second.
channelsinteger (1..8)2The soundtrack's channels: 1 is mono, 2 stereo.
backgroundWhat shows where nothing covers the frame: a colour, a gradient, or (blur) the picture itself, blurred to fill.
themeThe video's look: palette, fonts, radius, motion style and element presets. Elements use it through $tokens and style.
motionBlurA film camera's blur on everything that moves, in the export: each frame averages samples moments across the time its shutter is open, shutterAngle degrees of the frame (180 is half the frame, the film default). Drawn by the browser export, which a file with it uses on its own; the preview stays sharp.

Children: track, marker, multicam, captions. All elements

MIT licensed.