Type · typewriter-code
Typewriter code window
macOS-style code editor or terminal window that types syntax-coloured code with a block cursor; the panel grows upward line by line.
A free, MIT-licensed text animation from the Opus Motion Library — 616 motions for Remotion, React and plain HTML.

What Typewriter code window is for
Show the code behind a visual, a command being run, or a "made with code" credit beat.
Details
- Category
- Text animations & kinetic typography
- Length
- 6.0 s (180 frames at 30 fps)
- Formats
- 16:9, 1:1, 9:16
- Weight
- light
- Transparent overlay
- yes
- Seamless loop
- no
- Text props
linestitle- Colour props
cursorColor- Image props
src- Mood
- mid, paper, hud
- Roles
- type
- Pairs with
- Glitch image bursts, HUD chrome overlay, Radial blueprint plan
Use Typewriter code window in Remotion, React or HTML
Remotion project
# copy this motion into your Remotion project
node cli/mgl.mjs add typewriter-code --to ../my-app/src
# render an mp4 (run in the library folder)
node cli/mgl.mjs render typewriter-code --props '{"lines":["// fractal brownian motion","float fbm(vec2 p) {"," float v = 0.0, a = 0.5;"," for (int i = 0; i < 6; i++) {"," v += a * noise(p);"," p = p * 2.0 + vec2(1.7, 9.2);"," a *= 0.5;"," }"," return v;","}"],"title":"world.glsl","cursorColor":"#e6e6e6","src":""}'
# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export typewriter-code --as webm-alpha --props '{"lines":["// fractal brownian motion","float fbm(vec2 p) {"," float v = 0.0, a = 0.5;"," for (int i = 0; i < 6; i++) {"," v += a * noise(p);"," p = p * 2.0 + vec2(1.7, 9.2);"," a *= 0.5;"," }"," return v;","}"],"title":"world.glsl","cursorColor":"#e6e6e6","src":""}'React / Next.js
import {MotionPlayer} from 'opus-motion-library/web';
<MotionPlayer
motion="typewriter-code"
props={{
lines: [
'// fractal brownian motion',
'float fbm(vec2 p) {',
' float v = 0.0, a = 0.5;',
' for (int i = 0; i < 6; i++) {',
' v += a * noise(p);',
' p = p * 2.0 + vec2(1.7, 9.2);',
' a *= 0.5;',
' }',
' return v;',
'}',
],
title: 'world.glsl',
cursorColor: '#e6e6e6',
src: '',
}}
playOnView
loop="auto"
/>Plain HTML / WordPress
<script src="opus-motion.element.js" defer></script>
<opus-motion motion="typewriter-code"
props='{"lines":["// fractal brownian motion","float fbm(vec2 p) {"," float v = 0.0, a = 0.5;"," for (int i = 0; i < 6; i++) {"," v += a * noise(p);"," p = p * 2.0 + vec2(1.7, 9.2);"," a *= 0.5;"," }"," return v;","}"],"title":"world.glsl","cursorColor":"#e6e6e6","src":""}'>
</opus-motion>Compose spec (multi-scene video)
{
"width": 1920,
"height": 1080,
"fps": 30,
"scenes": [
{
"motion": "typewriter-code",
"props": {
"lines": [
"// fractal brownian motion",
"float fbm(vec2 p) {",
" float v = 0.0, a = 0.5;",
" for (int i = 0; i < 6; i++) {",
" v += a * noise(p);",
" p = p * 2.0 + vec2(1.7, 9.2);",
" a *= 0.5;",
" }",
" return v;",
"}"
],
"title": "world.glsl",
"cursorColor": "#e6e6e6",
"src": ""
}
}
]
}Typewriter code window props
22 parameters — change any of them to make the motion yours.
| Prop | Default | What it does |
|---|---|---|
lines | ["// fractal brownian motion","float fbm(vec2 p) {"," float v = 0.0, a = 0.5;"," for … | code lines (strings, or {text, color}); in terminal mode "$ " lines type, other lines are output |
mode | "editor" | editor (line numbers, syntax colours) | terminal (bold, prompt/output colours) |
title | "world.glsl" | filename centred in the title bar |
charsPerSecond | 42 | typing speed (video17 ≈ 30, video8 time-boxes ≈ 150 chars in 1 s) |
startFrame | 10 | frame the first character types (panel fades in 6 frames before) |
outputDelay | 8 | terminal: frames between a command finishing and its output appearing |
position | "corner" | corner (bottom-left panel) | center (bigger, centred) |
fontSize | 28 | code size in px at 1080p |
lineNumbers | true | |
colors | {} | override any of keyword, fn, number, string, comment, text, prompt, command, ok, warn, error, lineNo |
panelColor | "" | window body colour (empty = grey for editor, plum for terminal) |
headerColor | "" | title bar colour (empty = auto) |
cursorColor | "#e6e6e6" | block cursor colour (video17 uses red #ED3821) |
backdrop | "auto" | auto | dunes | warm | ink | cream | peaks | dusk | ocean | none — procedural scene behind the panel |
src | "" | optional public/ image behind the panel (overrides backdrop) |
theme | "dark" | dark | paper (light editor card, teal accents) |
highlightLines | [] | code-run-sync: 0-based lines a pale teal band steps through after typing ends, e.g. [4,5,6,7] |
highlightEvery | 10 | frames the band rests on each line |
consoleLines | [] | serial-monitor / console pane below the code, lines appended one by one while it runs; the play button turns into a red stop |
runAt | -1 | frame the Run is pressed (-1 = shortly after typing ends) |
consoleEvery | 9 | frames between console lines |
chips | false | numeric literals on small rounded chips |
Related motions

HUD chrome overlay
Technical / "made with code" framing over any scene; chaptered explainers. Set backdrop to "transparent" to overlay.
hud-chrome
Glitch image bursts
Beat hits, "system error" / hacked moments, energetic transitions between stills, music-video accents.
glitch-image
Radial blueprint plan
Hero background for systems / knowledge / network stories; reveal 3-8 categories around a hub.
radial-blueprint
Terrain build (3D)
"How it is made" / generative-art explainers: show a world being built step by step, then reward with a hero fly-through.
terrain-build-3d
Number counter
Depth/altitude/speed meters, growing stats, countdowns, progress percentages and scoreboards.
number-counter
Prompt wall
"The AI is thinking / system prompt" backdrops behind titles, techy section backgrounds on websites, agent and simulation promos.
prompt-wall
Notes & credits
Technique sources:
- video8 0:05-0:30
- video17 0:00-0:43 footer
- video13 0:00-0:20