Loop Break

A short loop of lines repeats faster each pass until a final line breaks it and highlights one phrase. A free, MIT-licensed Remotion text animation.

Installation
$ pnpm dlx shadcn@latest add @remocn/loop-break

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { LoopBreak } from "@/components/remocn/loop-break";
 
const LoopBreakScene = () => (
  <LoopBreak
    loop={["Render the cut.", "Spot a typo.", "Start over."]}
    fix="Change one word. Done."
    highlight="Done."
  />
);
 
export const RemotionRoot = () => (
  <Composition
    id="LoopBreak"
    component={LoopBreakScene}
    durationInFrames={430}
    fps={60}
    width={1280}
    height={720}
  />
);

The loop lines rise in one by one, hold, then rewind and replay faster on each of the passes. On the last pass the loop's final row is replaced by fix, which rises in sentence by sentence with the highlight phrase in the accent color while the earlier lines dim. Timing is tuned for a 215-frame composition and compresses if it is shorter. It ships light and dark.

Props14

PropTypeDefault
loop
string[]—

Lines of the repeating loop; at least two.

fix
string"Change one word. Done."

Line that breaks the loop; each sentence gets its own row.

highlight
string"Done."

Phrase inside fix that turns accent-colored.

passes
number3

How many times the loop plays before the break; minimum 2.

stagger
number3

Frames between words as a line rises in.

hold
number16

Frames a pass holds before it rewinds.

accent
string—

Accent color; overrides the theme accent.

ink
string—

Text color; overrides the theme ink.

background
string—

Background fill; pass "transparent" to drop it.

fontFamily
string"DM Sans"

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 speed multiplier for the whole timeline.

theme
"dark" | "light""dark"

Light or dark palette.

  • loopstring[]

    Lines of the repeating loop; at least two.

  • fixstring

    Line that breaks the loop; each sentence gets its own row.

    Default"Change one word. Done."

  • highlightstring

    Phrase inside fix that turns accent-colored.

    Default"Done."

  • passesnumber

    How many times the loop plays before the break; minimum 2.

    Default3

  • staggernumber

    Frames between words as a line rises in.

    Default3

  • holdnumber

    Frames a pass holds before it rewinds.

    Default16

  • accentstring

    Accent color; overrides the theme accent.

  • inkstring

    Text color; overrides the theme ink.

  • backgroundstring

    Background fill; pass "transparent" to drop it.

  • fontFamilystring

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

    Default"DM Sans"

  • 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 speed multiplier for the whole timeline.

    Default1

  • theme"dark" | "light"

    Light or dark palette.

    Default"dark"