Background
A full-frame gradient, dots or grid to put beneath everything.
tsx
import { Background, Composition, Title, Track } from "@cutcraft/kit";
// Background: a full-frame backdrop on the track beneath everything; dots here, or a gradient or a grid.
export default function Video() {
return (
<Composition fps={30} width={1920} height={1080}>
<Track id="back" layout="free">
<Background id="bg" start={0} duration={3} variant="dots" spacing={56} />
</Track>
<Track id="over" layout="free">
<Title
id="name"
start={0.3}
duration={2.7}
size={120}
font="$heading"
enter={{ type: "slide-up", duration: 0.5 }}
>
Shed Coffee
</Title>
</Track>
</Composition>
);
}Props
Besides the timing props (start, anchor, at, offset, duration):
| param | type | default | description |
|---|---|---|---|
id | string | The id of the element it draws. | |
variant | "gradient" | "dots" | "grid" | "gradient" | gradient from one colour to the other, dots or grid in the second colour over the first. |
width | number (> 0) | 1920 | The frame's size: a background covers it. |
height | number (> 0) | 1080 | The frame's height in pixels. |
colors | [string, string] | ["$background","$primary"] | The base colour and a second: the gradient's two ends, or the dots or grid drawn over the base. |
spacing | number (> 0) | 48 | The dots' or the grid's spacing, in pixels. |