Skip to content

<Captions> ​

Subtitles from an asset's transcript that follow the clips through every trim.

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

export default function Video() {
  return (
    <Composition fps={30} width={540} height={960}>
      <Track id="main">
        <Clip id="talk" src="asset:speaker" in="word:0" out="word:12.end" fit="cover" />
      </Track>
      {/* Words come from the clip's transcript and follow it through every trim. */}
      <Captions id="captions" src="asset:speaker" animation="karaoke" style={{ size: 36 }} />
    </Composition>
  );
}

Used in: Kinetic type · Captions and key points · the walkthrough · Product demo with zoom-ins · Talking-head cut · Variants from one file · Vertical clip from a podcast

Props ​

proptypedefaultrequired
idstringyes
srcstring
stylestring |
animation"none" | "word-highlight" | "word-by-word" | "karaoke" | "typewriter""none"
maxCharsinteger
maxDurationnumber5
maxGapnumber (0..∞)0.8
breakAfterstring[]

Visual. Children: caption. All elements

MIT licensed.