<Sticker>
A ready-made icon or sticker by name.
tsx
import { Clip, Composition, Sticker, 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={3} fit="cover" />
</Track>
<Track id="stickers">
<Sticker
id="check"
anchor="shot"
offset={0.3}
duration={2.5}
src="asset:star"
transform={{ scale: 2 }}
enter={{ type: "scale", duration: 0.4 }}
/>
</Track>
</Composition>
);
}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 stickers. | ||
src | string | yes | An image the manifest lists (asset:party): PNG, SVG, WebP or GIF. |
Timed, visual, transformable. Children: effect, keyframe, mask. All elements