Slide Doors

Two panels slide apart like doors to reveal 'Arriving in your repo.' with an accent word. A free, MIT-licensed Remotion text animation.

Installation
$ pnpm dlx shadcn@latest add @remocn/slide-doors

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { SlideDoors } from "@/components/remocn/slide-doors";
 
const SlideDoorsScene = () => (
  <SlideDoors lines={["Scenes that move.", "Code you own.", "Arriving in your repo."]} highlight="repo." />
);
 
export const RemotionRoot = () => (
  <Composition
    id="SlideDoors"
    component={SlideDoorsScene}
    durationInFrames={330}
    fps={60}
    width={1280}
    height={720}
  />
);

Each line slides apart like a pair of doors and the next line is revealed in the gap, ending with the last line and its highlight word in the accent colour. Pass lines and highlight; it ships light and dark.

Props12

PropTypeDefault
lines
string[]—

Lines shown in turn; the last one gets the highlight.

highlight
string"repo."

Word or phrase set in the accent colour.

hold
number28

Frames the final line holds.

fontWeight
number400

Weight of the lines.

accent
string—

Accent colour (any CSS colour).

ink
string—

Text color; overrides the theme ink.

background
string—

Overrides the theme background colour.

fontFamily
string"Plus Jakarta 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 multiplier; above 1 plays faster.

theme
"dark" | "light""dark"

Colour scheme; ships light and dark.

  • linesstring[]

    Lines shown in turn; the last one gets the highlight.

  • highlightstring

    Word or phrase set in the accent colour.

    Default"repo."

  • holdnumber

    Frames the final line holds.

    Default28

  • fontWeightnumber

    Weight of the lines.

    Default400

  • accentstring

    Accent colour (any CSS colour).

  • 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"Plus Jakarta 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 multiplier; above 1 plays faster.

    Default1

  • theme"dark" | "light"

    Colour scheme; ships light and dark.

    Default"dark"