Skip to content

Production-ready animations, transitions, backgrounds, and scenes for Remotion

3.0 KB
Raw Blame
---
title: Rewrite Bars
description: "Bars sweep over a headline to rewrite it, 'Your launch video, rendered from code.'"
component: rewrite-bars
vibe: premium
length: 161
useWhen:
  - "A feature walkthrough where one headline is rewritten into the next as bars sweep across it."
  - "A launch beat that cycles three claims, each with a small numbered eyebrow."
avoidWhen:
  - "You only have one line and no rewrite is needed — use `scan-reveal`."
  - "You want the words swapped by fading rather than bars — use `per-word-crossfade`."
askedAs:
  - "bars sweep rewrite headline"
  - "headline changes under wipe bars"
  - "I want colored bars to sweep over a title and replace it with a new one"
  - "feature walkthrough where each headline is rewritten by a sweeping bar"
  - "launch title that morphs into the next line through sliding bars"
  - "viewer sees copy being edited live, one claim wiped into another"
---

<ComponentPreview name="rewrite-bars" />

<InstallBlock name="rewrite-bars" />

## 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={190}
    fps={30}
    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.

<PropsTable title="Props"
  rows={[
    {
      name: "headlines",
      type: "string[]",
      description: "Headlines in order; bars rewrite each into the next.",
    },
    {
      name: "eyebrows",
      type: "string[]",
      description: "Small label above each headline.",
    },
    {
      name: "highlight",
      type: "string",
      default: "\"rendered from code\"",
      description: "Phrase tinted with the accent colour.",
    },
    {
      name: "align",
      type: "\"center\" | \"left\"",
      default: "\"center\"",
      description: "Text alignment of the headline block.",
    },
    {
      name: "hold",
      type: "number",
      default: "20",
      description: "Frames the text holds before the next beat.",
    },
    {
      name: "accent",
      type: "string",
      default: "\"#3B5BFD\"",
      description: "Accent colour (any CSS colour).",
    },
    {
      name: "background",
      type: "string",
      description: "Overrides the theme background colour.",
    },
    {
      name: "speed",
      type: "number",
      default: "1",
      description: "Playback multiplier; above 1 plays faster.",
    },
    {
      name: "theme",
      type: "\"dark\" | \"light\"",
      default: "\"dark\"",
      description: "Colour scheme; ships light and dark.",
    },
  ]}
/>