Skip to content

Callout ​

A note in a box, with a line drawn to what it is about.

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

// Callout: a note in a box, with a line drawn to what it is about.
export default function Video() {
  return (
    <Composition fps={30} width={1920} height={1080}>
      <Track id="main">
        <Clip id="shot" src="asset:coffee" in={12} out={15} fit="cover" />
      </Track>
      <Track id="over" layout="free">
        <Callout
          id="tip"
          start={0.4}
          duration={2.6}
          text="Bloom for 30 seconds"
          x={520}
          y={-300}
          to={{ x: 60, y: 40 }}
        />
      </Track>
    </Composition>
  );
}

The coffee footage is Pixabay videos 209419 and 209424, under the Pixabay Content License.

Props ​

Besides the timing props (start, anchor, at, offset, duration):

paramtypedefaultdescription
idstringThe component's id; each of its parts' ids starts with it.
textstringThe note, in the body face; the box grows taller to fit it.
xnumber320The box's centre, in pixels from the frame's centre.
ynumber-220The box's centre, in pixels below the frame's centre.
widthnumber (> 0)420The box's width in pixels.
toWhat it points at; without it, the box stands alone.
colorstring"$accent"The colour of the box's border, the line and its dot.

All components

MIT licensed.