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.
$ pnpm dlx shadcn@latest add @remocn/rewrite-barsHow 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:
npx shadcn@latest add @remocn/rewrite-barsheadlinesplay in order. Each one resolves from under the bars, holds forholdframes, 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 ofhighlightget an accent gradient fill. eyebrowsis optional. It defaults to01 · 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.
staggersets 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 + 40frames (60 by default: 14 to resolve,hold, 12 to collapse, 14 to reflow) plus2 * staggerfor each extra line it wraps to. The last headline needs 14 frames plusstaggerper 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-fontsfrom npm, plus the remocn helperframe-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. PassfontFamilyto use your own face for the headlines, and load that font in your project.
Usage
// 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
| Prop | Type | Default |
|---|---|---|
| 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.
Default
20 - staggernumber
Frames between lines as the bars sweep a headline in and out.
Default
3 - fontWeightnumber
Weight of the headlines.
Default
500 - 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.
Default
1 - delaynumber
Frames to hold the first frame before anything moves.
Default
0 - speednumber
Playback multiplier; above 1 plays faster.
Default
1 - theme"dark" | "light"
Colour scheme; ships light and dark.
Default
"dark"