Skip to content

<Track> ​

A row of elements. A sequence track plays its children back to back; a free track (layout="free") places each at its own start.

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

export default function Video() {
  return (
    <Composition fps={30} width={960} height={540}>
      {/* A sequence track: clips play back to back, in order. */}
      <Track id="main">
        <Clip id="a" src="asset:aurora" in={0} out={2} fit="cover" />
        <Clip id="b" src="asset:cells" in={0} out={2} fit="cover" />
      </Track>
      {/* A free track: each element sits at its own start. */}
      <Track id="marks" layout="free">
        <Shape
          id="dot"
          start={0.5}
          duration={3}
          shape="circle"
          width={90}
          height={90}
          fill="#c8402a"
          transform={{ position: { x: 360, y: -170 } }}
        />
      </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
idstringyesThe track's name in the file; ducking and actions refer to it by this.
layout"sequence" | "free""sequence"sequence plays its children back to back; free places each at its own start or anchor.
namestringA label for the editor's track header.
role"general" | "captions" | "dialogue" | "music" | "effects" | "ambience""general"What the track holds; a duck with under: "dialogue" turns sound down under every track of that role.
lockedbooleanfalseThe editor will not change it.
hiddenbooleanfalseNot drawn and not heard.
mutedbooleanfalseDrawn but not heard.
solobooleanfalseWhen any track is solo, only solo tracks are heard.
groupstringTracks with the same group move together in the editor.

Children: clip, audio, gap, transition, title, shape, svg, sticker, adjustment, nested, layer, multicam. All elements

MIT licensed.