<Title>
Text over the picture in the theme's type, with entrances by letter, word or line.
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:spiral" in={0} out={4} fit="cover" />
</Track>
<Track id="text">
<Title
id="title"
anchor="shot"
offset={0.3}
duration={3.4}
style="h1"
size={64}
animation={{ preset: "word-by-word" }}
>
Cut by words, not seconds
</Title>
</Track>
</Composition>
);
}Used in: 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
| prop | type | default | required | description |
|---|---|---|---|---|
id | string | yes | The element's name: unique in the file, and what anchors, ducking and the editor refer to it by. | |
start | number (0..∞) | Seconds from the start of the video. Free-layout tracks only; on a sequence track the element follows the one before it. | ||
anchor | "start" | string | Overlays: start relative to another element's start, or to its end with id.end. | ||
at | string | With anchor: a word, shot or silence of the anchor's source (word:14655); the start is where the anchor plays it, plus offset. | ||
offset | number | Seconds added to the start that anchor and at give; negative starts earlier. | ||
duration | number (> 0) | "fill" | "source" | { match } | | How long it plays: seconds; "source" for the whole trimmed source; "fill" to run to the end of the composition; { match: id } for as long as another element; { until: id } to end when another element ends. | ||
transform | Where it sits and how it is turned: position, scale, rotation, anchor, opacity, rounded corners and crop. | |||
fit | "contain" | "cover" | "stretch" | "none" | How it fills the frame: contain shows all of it, cover fills the frame and crops, stretch distorts to fill, none keeps its own size. | ||
blend | "normal" | "multiply" | "screen" | "overlay" | "darken" | … 13 more | How it mixes with what is under it, as CSS mix-blend-mode does. | ||
blendOpacity | number (0..1) | How strongly it blends: multiplied into its opacity. | ||
enter | How it comes in: a fade, slide, scale or wipe over its first seconds, with an easing. | |||
exit | How it goes out, over its last seconds, as enter. | |||
style | string | A theme preset for titles; without one, the theme's default title preset applies. | ||
font | string | "Inter" | The font family: a bundled one, one the file declares, or one from the font catalogue. A theme preset may set it instead. | |
size | number (1..1000) | 48 | The letters' size, in pixels. | |
weight | integer (100..900) | "normal" | "bold" | "bold" | How heavy the letters are: 100 to 900, or normal and bold. | |
italic | boolean | false | Slanted letters. | |
color | string | "#ffffff" | The letters' colour, or a theme token such as $text. | |
background | string | A colour filling the text box behind the letters. | ||
stroke | An outline around the letters: its colour and width in pixels. | |||
shadow | A drop shadow under the letters: colour, blur and offset in pixels. | |||
align | "left" | "center" | "right" | "justify" | "center" | Which side of the text box the lines sit against. | |
valign | "top" | "middle" | "bottom" | "middle" | Where in the text box's height the text sits. | |
width | number (> 0) | The text box, in composition pixels; the whole frame when left out, so background, align and valign work inside it. | ||
height | number (> 0) | The text box's height, in pixels, as width. | ||
lineHeight | number (0.1..10) | 1.2 | The distance between lines, as a multiple of the letters' size. | |
letterSpacing | number (-100..100) | 0 | Extra space between letters, in pixels. | |
decoration | "none" | "underline" | "line-through" | "overline" | A line under, over or through the letters. | ||
animation | An entrance and exit by letter, word or line: a preset, its seconds in and out, and the delay between units. |
Timed, visual, transformable. Children: effect, keyframe, mask. All elements