Create beautiful, animated code windows for your videos using Remotion. Generate macOS-style code windows with typewriter animations, syntax highlighting, and customizable themes.
developed with ❤️ @ Sentry
- Typewriter Animation: Smooth character-by-character typing with intelligent word bursting
- Multiple Themes: 9 built-in themes (Dark, Light, GitHub, GitHub Dark, Vercel, Nord, Dracula, Monokai, Sentry)
- Syntax Highlighting: Powered by sugar-high
- macOS-style Window: Beautiful window chrome with colored dots
- Line Numbers: Optional line numbering
- Customizable: Control size, font, colors, animation speed, and more
- Transparent Background Support: Export with alpha channel for video editing
# Clone the repository
git clone <your-repo-url>
cd animate-code-tool
# Install dependencies (using pnpm)
pnpm install
# Start the Remotion Studio
pnpm dev-
Start the development server:
pnpm dev
-
Open Remotion Studio in your browser (usually at
http://localhost:3000) -
Customize your code window using the interactive props editor in the right sidebar
-
Preview in real-time and adjust settings until you're happy
-
Render your video using the render button or CLI
The CodeWindowScene component accepts the following props:
| Prop | Type | Default | Description |
|---|---|---|---|
code |
string |
Sample code | The code to display and animate |
filename |
string |
"fibonacci.js" |
Filename shown in the window header |
| Prop | Type | Default | Description |
|---|---|---|---|
theme |
string |
"dark" |
Color theme (see Themes section) |
fontSize |
number |
20 |
Font size in pixels (8-72) |
showLineNumbers |
boolean |
true |
Show/hide line numbers |
showCursor |
boolean |
true |
Show/hide blinking cursor during animation |
width |
number |
1200 |
Window width in pixels (200-2000) |
height |
number |
600 |
Window height in pixels (100-2000) |
scale |
number |
1.0 |
Scale factor for the entire window (0.1-3.0) |
| Prop | Type | Default | Description |
|---|---|---|---|
animate |
boolean |
false |
Enable typewriter animation |
animationSpeed |
number |
15 |
Animation speed (1-100, higher = faster) |
delay |
number |
0 |
Delay in frames before animation starts (0-300) |
durationInFrames |
number |
800 |
Total video duration in frames |
The animationSpeed prop controls how fast the typewriter effect types:
- 1-20: Slow, deliberate typing (good for tutorials)
- 20-50: Medium speed (good for demonstrations)
- 50-100: Fast typing (good for quick showcases)
Note: The animation uses intelligent word bursting - it types faster in the middle of words and slows down at spaces for a more natural feel.
Choose from 9 professionally designed themes:
dark- Clean dark theme with subtle colorslight- Bright light themegithub- GitHub's light themegithubDark- GitHub's dark themevercel- Vercel's signature black theme with cyan/magenta accentsnord- Popular Nord color palettedracula- The famous Dracula thememonokai- Classic Monokai themesentry- Sentry's purple theme
- Open Remotion Studio (
pnpm dev) - Click the "Render" button in the top right
- Select ProRes as the codec
- Under ProRes profile, select 4444
- Click "Picture" and change the Image Format to PNG
- Change "Pixel Format" to "yuva444p10le"
- Click "Render"
# Basic render
npx remotion render CodeWindow out/MyCodeWindow.mp4
# Render with custom props
npx remotion render CodeWindow out/MyCodeWindow.mp4 --props='{"code":"console.log(\"Hello\");","filename":"hello.js","animate":true}'
# Render at higher quality
npx remotion render CodeWindow out/MyCodeWindow.mp4 --quality=100Important: Since Remotion v2.1.7, you can render with alpha channel support for transparent backgrounds. This is perfect for overlaying code windows on other video content.
To render with transparency, you must use the ProRes codec with an alpha-supporting profile:
npx remotion render CodeWindow out/MyCodeWindow.mov \
--codec=prores \
--prores-profile=4444 \
--pixel-format=yuva444p10le4444- ProRes 4444 (highest quality with alpha)hq- ProRes HQ (high quality with alpha)
- Codec:
prores - ProRes Profile:
4444orhq - Pixel Format:
yuva444p10le
Note: ProRes files are larger than H.264/H.265 but preserve transparency and offer better quality for video editing workflows. The
.movextension is recommended for ProRes output.
Edit src/themes/index.ts to add your own themes:
export const themes: Record<string, CodeTheme> = {
myTheme: {
name: "My Custom Theme",
background: "#1a1a1a",
border: "#333333",
headerBg: "#1a1a1a",
headerText: "#ffffff",
codeBg: "#1a1a1a",
codeText: "#e0e0e0",
lineNumbers: "rgba(255, 255, 255, 0.3)",
dots: {
red: "#ff5f57",
yellow: "#febc2e",
green: "#28c840",
},
syntax: {
keyword: "#ff6b9d",
string: "#c3e88d",
number: "#f78c6c",
comment: "#546e7a",
function: "#82aaff",
class: "#ffcb6b",
property: "#89ddff",
operator: "#89ddff",
},
},
// ... other themes
};Contributions are welcome! Feel free to:
- Add new themes
- Improve animation algorithms
- Add new features
- Fix bugs
Built with Remotion 🎬


