Skip to content

Pill ​

Deprecated

<Graphic> and its kinds are deprecated and will be removed in a later release; the lint warns on each one. Draw the same thing with <Motion>, <Three> or a <Layer>: the examples show each, and Free code explains them.

A fully rounded label, with an optional dot before the text (a live indicator, a status).

tsx
<Composition fps={30} width={640} height={360}>
  <Track id="main" layout="free">
    <Graphic
      id="g1"
      kind="pill"
      text="Live"
      dot="#ff3b30"
      start={0}
      duration={3}
    />
  </Track>
</Composition>

Props ​

proptypedefault
textstring"Live"
colorstring"$onPrimary"
fontstring"$body"
sizenumber (0..400)28
weightinteger700
fillstring"$primary"
dotstring"none"

Plus the <Graphic> props every kind takes. More in Callouts.

MIT licensed.