Skip to content

ProgressBar ​

A bar that fills from the left to its value.

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

// ProgressBar: a bar that fills from the left to its value.
export default function Video() {
  return (
    <Composition fps={30} width={1920} height={1080}>
      <Track id="main">
        <Clip id="shot" src="asset:coffeeWide" in={4} out={7} fit="cover" />
      </Track>
      <Track id="over" layout="free">
        <ProgressBar id="brew" start={0.3} duration={2.7} value={0.7} fillFor={1.8} />
      </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.
valuenumber (0..1)1How full it ends, 0 to 1.
xnumber0The bar's centre, in pixels from the frame's centre.
ynumber440The bar's centre, in pixels below the frame's centre.
widthnumber (> 0)1200The full bar's length in pixels.
heightnumber (> 0)14The bar's thickness in pixels; its ends are rounded.
colorstring"$primary"The fill's colour; the track under it is a faint $muted.
fillFornumber (> 0)1.2Seconds it takes to fill.

All components

MIT licensed.