Slide Doors
A rhythmic three-line pitch: each line splits like doors sliding apart, the next line pushes through the gap and out the previous one, and the last line lands on one highlighted word. A free, MIT-licensed Remotion text animation.
In Remotion, Slide Doors reveals a pitch line by line: each line splits in two like doors sliding apart, the next line pushes through the gap, and the last line lands on one highlighted word. Use it for a rhythmic three-line pitch.
$ pnpm dlx shadcn@latest add @remocn/slide-doorsHow to make doors slide apart to reveal each line
A rhythmic pitch where each line parts like a pair of sliding doors and the next line pushes the previous one out is one component:
npx shadcn@latest add @remocn/slide-doors- The first line slides in over 20 frames and holds for
hold(28). Then its halves crack open over 8 frames, the next line pushes through the gap and grows over 16, and the doors clear off over 14 more. - Length in 30 fps frames: 58 +
hold+ (lines − 2) × (24 +hold) for two or more lines, so 138 for the default three. Each extra line adds 52 frames at the defaulthold. highlightcolors one word of the last line in the accent; the match ignores case and punctuation. Words on earlier lines cannot be highlighted without editing the copied file.
For a single line use Scan Reveal; to rewrite lines in place, Rewrite Bars.
Good to know
- Length: 138 frames of motion at 30 fps (276 at 60 fps) with the default props. That is the minimum for its
Sequence; add your own hold on top. The Usage example below is a 60 fps composition, so the numbers it hands to Remotion (durationInFrames,Sequencelengths) are doubled. The component's own props counted in frames (delay, stagger, hold) stay in 30 fps frames at any frame rate, see Frame rate. - Installs:
remotion,@remotion/google-fontsfrom npm, plus the remocn helpersglide,frame-rate,timeline. The shadcn CLI copies the source into your project. - Font: loads Plus Jakarta Sans itself through
@remotion/google-fonts. PassfontFamilyto use your own face, and load that font in your project.
Usage
// 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
| Prop | Type | Default |
|---|---|---|
| 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.
Default
28 - fontWeightnumber
Weight of the lines.
Default
400 - 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.
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"