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):
| param | type | default | description |
|---|---|---|---|
id | string | The component's id; each of its parts' ids starts with it. | |
text | string | The note, in the body face; the box grows taller to fit it. | |
x | number | 320 | The box's centre, in pixels from the frame's centre. |
y | number | -220 | The box's centre, in pixels below the frame's centre. |
width | number (> 0) | 420 | The box's width in pixels. |
to | What it points at; without it, the box stands alone. | ||
color | string | "$accent" | The colour of the box's border, the line and its dot. |