Factor Out
Three short imperatives stack above a big blue "in your editor.". A free, MIT-licensed Remotion text animation.
$ pnpm dlx shadcn@latest add @remocn/factor-outUsage
// src/Root.tsx
import { Composition } from "remotion";
import { FactorOut } from "@/components/remocn/factor-out";
const FactorOutScene = () => <FactorOut heads={["Write the scenes", "Pick the colors", "Fix the typos"]} tail="in your editor." />;
export const RemotionRoot = () => (
<Composition
id="FactorOut"
component={FactorOutScene}
durationInFrames={380}
fps={60}
width={1280}
height={720}
/>
);Short imperative lines enter one by one and align, then the shared tail merges out of them: lines collapse one at a time until a single stack sits above a big tail phrase. Pass heads (the repeated beginnings) and tail (the shared ending).
Props12
| Prop | Type | Default |
|---|---|---|
| heads | string[]DEFAULT_HEADS Short repeated lines that stack, one per row. | |
| tail | stringDEFAULT_TAIL Shared ending shown large after the lines merge. | |
| stagger | number8 Frames between one line entering and the next. | |
| accent | string— Color of the tail phrase; defaults to the theme accent. | |
| ink | string— Text color; overrides the theme ink. | |
| background | string— Stage fill color; pass "transparent" to overlay your own footage. | |
| fontFamily | string"Rubik" Typeface for the copy. Load the font in your project first. | |
| fontWeight | number500 Weight of the lines and the tail. | |
| 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 for the whole timeline. | |
| theme | "dark" | "light""dark" Color scheme; ships dark and light. | |
- headsstring[]
Short repeated lines that stack, one per row.
Default
DEFAULT_HEADS - tailstring
Shared ending shown large after the lines merge.
Default
DEFAULT_TAIL - staggernumber
Frames between one line entering and the next.
Default
8 - accentstring
Color of the tail phrase; defaults to the theme accent.
- inkstring
Text color; overrides the theme ink.
- backgroundstring
Stage fill color; pass "transparent" to overlay your own footage.
- fontFamilystring
Typeface for the copy. Load the font in your project first.
Default
"Rubik" - fontWeightnumber
Weight of the lines and the tail.
Default
500 - 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 for the whole timeline.
Default
1 - theme"dark" | "light"
Color scheme; ships dark and light.
Default
"dark"