Overnight

Three timestamped story lines play as a night panel descends and a morning panel rises over an evening ground. A free, MIT-licensed Remotion text animation.

Installation
$ pnpm dlx shadcn@latest add @remocn/overnight

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { Overnight } from "@/components/remocn/overnight";
 
const OvernightScene = () => (
  <Overnight
    evening={{ slug: "Thursday, 6:00 PM", line: "The launch was at nine the next morning." }}
    night={{ slug: "Friday, 12:50 AM", line: "The demo video was still a blank file." }}
    morning={{ slug: "Friday, 8:55 AM", line: "The demo went up before the post did." }}
  />
);
 
export const RemotionRoot = () => (
  <Composition
    id="Overnight"
    component={OvernightScene}
    durationInFrames={180}
    fps={30}
    width={1280}
    height={720}
  />
);

An evening line sits under a timestamp on a warm ground. A dark night panel then descends over it and the night line rises in, before a bright morning panel sweeps up from the bottom and the morning line lands in dark ink. Pass evening, night and morning as { slug, line }. It ships light and dark; 150 frames is measured for a 16:9 frame at 180 frames.

Props12

PropTypeDefault
evening
{ slug: string; line: string }DEFAULT_EVENING

First beat: a timestamp and the line shown on the warm ground.

night
{ slug: string; line: string }DEFAULT_NIGHT

Second beat: shown on the dark panel that descends.

morning
{ slug: string; line: string }DEFAULT_MORNING

Third beat: shown on the bright panel that rises.

nightAt
number52

Frame the night panel starts to come down, at a 180-frame length; longer cuts stretch it.

morningAt
number118

Frame the morning panel starts to rise, at a 180-frame length; longer cuts stretch it.

accent
string—

Timestamp color and the morning panel color; overrides the theme.

background
string—

Evening ground under the panels; pass "transparent" to drop it.

fontFamily
string"Afacad"

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

speed
number1

Playback speed multiplier for the whole timeline.

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.

theme
"dark" | "light""dark"

Light or dark palette.

  • evening{ slug: string; line: string }

    First beat: a timestamp and the line shown on the warm ground.

    DefaultDEFAULT_EVENING

  • night{ slug: string; line: string }

    Second beat: shown on the dark panel that descends.

    DefaultDEFAULT_NIGHT

  • morning{ slug: string; line: string }

    Third beat: shown on the bright panel that rises.

    DefaultDEFAULT_MORNING

  • nightAtnumber

    Frame the night panel starts to come down, at a 180-frame length; longer cuts stretch it.

    Default52

  • morningAtnumber

    Frame the morning panel starts to rise, at a 180-frame length; longer cuts stretch it.

    Default118

  • accentstring

    Timestamp color and the morning panel color; overrides the theme.

  • backgroundstring

    Evening ground under the panels; pass "transparent" to drop it.

  • fontFamilystring

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

    Default"Afacad"

  • speednumber

    Playback speed multiplier for the whole timeline.

    Default1

  • 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

  • theme"dark" | "light"

    Light or dark palette.

    Default"dark"