Components
Ready-made pieces: lower thirds, callouts, counters, cards and the like. Import them from @cutcraft/kit and write them on a track like any element. Generated from packages/kit/src/components by pnpm docs:gen.
LowerThirdA name and a role in the lower third, on a card or beside an accent bar.CalloutA note in a box, with a line drawn to what it is about.BadgeA short word on a pill that pops in.CounterA number that counts to its value, with a label.ProgressBarA bar that fills from the left to its value.ArrowAn arrow drawn from one point to another, straight or bowed.HighlightA hand-drawn underline, marker stroke, circle or strike on something in the frame.BackgroundA full-frame gradient, dots or grid to put beneath everything.TypeCardA card of big type that builds line by line, with pills and struck-out lines.QuoteCardA passage on a paper card with its source, and a marker over the phrases that matter.FrameA rounded border around part of the picture.Anatomy of a component
A component is an ordinary function that returns the kit's own elements: titles, shapes, SVG, and a layer where something moves every frame. So it behaves like the elements it is made of.
tsx
<LowerThird id="name" start={0.5} duration={4} name="Maya Chen" role="Founder, Shed" />| Part | How it works |
|---|---|
id | Names the component. Each element it makes has an id that starts with it: name-card, name-bar, name-name, name-role. |
| Timing | The same props as any element: start, or anchor with at and offset, and duration, including { until: id }. Its parts come in and go out inside that time. |
| Position | x and y are pixels from the frame's centre, as every element's transform.position. The defaults suit a 1920x1080 frame. |
| Look | Colours default to theme tokens ($primary, $surface, $text) and text to the theme's fonts, so a theme restyles every component. |
| Its own props | The words and options it draws, listed on its page: name and role for a lower third, to and format for a counter. |
| In an editor | Its props are editable in an inspector. Editing one of its parts writes that use out into the file as plain elements, and the edit applies to them. |
Any function that returns elements works the same way, so you can write your own (Helpers). Anatomy of an element covers the parts every element shares.