Rewrite Bars

Colored bars sweep across a headline and rewrite it into the next one, line by line, with a small numbered eyebrow above: a feature walkthrough that cycles through claims. A free, MIT-licensed Remotion text animation.

In Remotion, Rewrite Bars rewrites one headline into the next as colored bars sweep across it: the bars cover each line, collapse, and leave the next headline behind, with a small numbered eyebrow label above. Use it for a feature walkthrough or a launch beat that cycles through two or three claims.

Installation
$ pnpm dlx shadcn@latest add @remocn/rewrite-bars

How to rewrite a headline under sweeping bars in Remotion

Bars sweeping over a headline and leaving a new one behind is one component, not a custom @remotion/transitions presentation or a clip-path wipe. Install it and pass your headlines:

bash
npx shadcn@latest add @remocn/rewrite-bars
  • headlines play in order. Each one resolves from under the bars, holds for hold frames, then the bars collapse it and reflow into the next. The last headline stays.
  • The bars are a blue gradient tinted by accent. The words of highlight get an accent gradient fill.
  • eyebrows is optional. It defaults to 01 · Scenes, 02 · Captions, 03 · Render; pass [] to hide the labels. With fewer eyebrows than headlines, the last one stays up.
  • A headline wraps into up to three balanced lines, and the type shrinks until every headline fits 80% of the frame width. stagger sets the frames between lines.
  • Word widths are measured on a canvas before the first frame (held with delayRender), so you don't need @remotion/layout-utils.

For a single line with no rewrite use Scan Reveal.

Good to know

  • Length: 161 frames of motion at 30 fps with the three default headlines (322 at 60 fps). The Usage example runs 380 frames at 60 fps, which adds a hold at the end.
  • Length for your own headlines, in 30 fps frames: motion starts at frame 12. Each headline before the last takes hold + 40 frames (60 by default: 14 to resolve, hold, 12 to collapse, 14 to reflow) plus 2 * stagger for each extra line it wraps to. The last headline needs 14 frames plus stagger per extra line to resolve. The props counted in frames stay in 30 fps frames at any frame rate, see Frame rate.
  • Installs: remotion, @remotion/google-fonts from npm, plus the remocn helper frame-rate. The shadcn CLI copies the source into your project.
  • Font: loads Figtree for the headlines and Geist Mono for the eyebrows through @remotion/google-fonts. Pass fontFamily to use your own face for the headlines, and load that font in your project.

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { RewriteBars } from "@/components/remocn/rewrite-bars";
 
const RewriteBarsScene = () => (
  <RewriteBars headlines={["Scenes you copy.", "Captions that follow the voice.", "Rendered from code."]} highlight="rendered from code" />
);
 
export const RemotionRoot = () => (
  <Composition
    id="RewriteBars"
    component={RewriteBarsScene}
    durationInFrames={380}
    fps={60}
    width={1280}
    height={720}
  />
);

Bars sweep over the current headline, collapse, and reflow it into the next one, with a small eyebrow label above each. Pass headlines, eyebrows and the highlight phrase; it ships light and dark.

Props15

PropTypeDefault
headlines
string[]—

Headlines in order; bars rewrite each into the next.

eyebrows
string[]—

Small label above each headline.

highlight
string"rendered from code"

Phrase tinted with the accent colour.

align
"center" | "left""center"

Text alignment of the headline block.

hold
number20

Frames the text holds before the next beat.

stagger
number3

Frames between lines as the bars sweep a headline in and out.

fontWeight
number500

Weight of the headlines.

accent
string"#3B5BFD"

Accent colour (any CSS colour).

ink
string—

Text color; overrides the theme ink.

background
string—

Overrides the theme background colour.

fontFamily
string"Figtree"

Typeface for the copy. Load the font in your project first.

scale
number1

Size of the foreground around the frame's center; the background stays put.

delay
number0

Frames to hold the first frame before anything moves.

speed
number1

Playback multiplier; above 1 plays faster.

theme
"dark" | "light""dark"

Colour scheme; ships light and dark.

  • headlinesstring[]

    Headlines in order; bars rewrite each into the next.

  • eyebrowsstring[]

    Small label above each headline.

  • highlightstring

    Phrase tinted with the accent colour.

    Default"rendered from code"

  • align"center" | "left"

    Text alignment of the headline block.

    Default"center"

  • holdnumber

    Frames the text holds before the next beat.

    Default20

  • staggernumber

    Frames between lines as the bars sweep a headline in and out.

    Default3

  • fontWeightnumber

    Weight of the headlines.

    Default500

  • accentstring

    Accent colour (any CSS colour).

    Default"#3B5BFD"

  • inkstring

    Text color; overrides the theme ink.

  • backgroundstring

    Overrides the theme background colour.

  • fontFamilystring

    Typeface for the copy. Load the font in your project first.

    Default"Figtree"

  • scalenumber

    Size of the foreground around the frame's center; the background stays put.

    Default1

  • delaynumber

    Frames to hold the first frame before anything moves.

    Default0

  • speednumber

    Playback multiplier; above 1 plays faster.

    Default1

  • theme"dark" | "light"

    Colour scheme; ships light and dark.

    Default"dark"