Skip to content

<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 ​

proptypedefaultrequireddescription
idstringyesThe element's name: unique in the file, and what anchors, ducking and the editor refer to it by.
startnumber (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" | stringOverlays: start relative to another element's start, or to its end with id.end.
atstringWith anchor: a word, shot or silence of the anchor's source (word:14655); the start is where the anchor plays it, plus offset.
offsetnumberSeconds added to the start that anchor and at give; negative starts earlier.
durationnumber (> 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.
transformWhere 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 moreHow it mixes with what is under it, as CSS mix-blend-mode does.
blendOpacitynumber (0..1)How strongly it blends: multiplied into its opacity.
enterHow it comes in: a fade, slide, scale or wipe over its first seconds, with an easing.
exitHow it goes out, over its last seconds, as enter.
stylestringA theme preset for stickers.
srcstringyesAn image the manifest lists (asset:party): PNG, SVG, WebP or GIF.

Timed, visual, transformable. Children: effect, keyframe, mask. All elements

MIT licensed.