Opus Motion ★ Star on GitHub

Type · typewriter-delete-retype

Typewriter delete & retype

A lead-in line is typed once, then phrases are typed after it with an uneven keystroke rhythm, held, then deleted — backspacing with accelerating speed or select-all-and-delete — and replaced by the next phrase, with an optional typo that is noticed and corrected and a blinking bar, block or underscore caret.

A free, MIT-licensed text animation from the Opus Motion Library — 616 motions for Remotion, React and plain HTML.

Typewriter delete & retype: three frames of the text animation, start, middle and end
Typewriter delete & retype — start, middle and end of the 9.7-second motion.

What Typewriter delete & retype is for

Hero taglines that cycle ("Built to be fast / secure / simple"), search-box and prompt demos, "we help X do Y" rotators, chat/AI typing intros, coding-themed titles; set prefix and phrases[].

  • text
  • typewriter
  • typing
  • delete
  • backspace
  • retype
  • cursor
  • caret
  • tagline
  • hero
  • rotator
  • prompt
  • ai
  • search
  • typography
  • kinetic
  • website
  • overlay

Details

Category
Text animations & kinetic typography
Length
9.7 s (290 frames at 30 fps)
Formats
16:9, 1:1, 9:16
Weight
light
Transparent overlay
yes
Seamless loop
no
Text props
prefix
Colour props
background ink accent cursorColor
Mood
ui
Roles
type, accent

Use Typewriter delete & retype in Remotion, React or HTML

Remotion project

terminal
# copy this motion into your Remotion project
node cli/mgl.mjs add typewriter-delete-retype --to ../my-app/src

# render an mp4 (run in the library folder)
node cli/mgl.mjs render typewriter-delete-retype --props '{"prefix":"Built to be ","background":"#0F1217","ink":"#ECEFF4","accent":"#4FE3A6","cursorColor":"#4FE3A6"}'

# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export typewriter-delete-retype --as webm-alpha --props '{"prefix":"Built to be ","background":"#0F1217","ink":"#ECEFF4","accent":"#4FE3A6","cursorColor":"#4FE3A6"}'

React / Next.js

tsx
import {MotionPlayer} from 'opus-motion-library/web';

<MotionPlayer
  motion="typewriter-delete-retype"
  props={{
    prefix: 'Built to be ',
    background: '#0F1217',
    ink: '#ECEFF4',
    accent: '#4FE3A6',
    cursorColor: '#4FE3A6',
  }}
  playOnView
  loop="auto"
/>

Plain HTML / WordPress

html
<script src="opus-motion.element.js" defer></script>

<opus-motion motion="typewriter-delete-retype"
  props='{"prefix":"Built to be ","background":"#0F1217","ink":"#ECEFF4","accent":"#4FE3A6","cursorColor":"#4FE3A6"}'>
</opus-motion>

Compose spec (multi-scene video)

json
{
  "width": 1920,
  "height": 1080,
  "fps": 30,
  "scenes": [
    {
      "motion": "typewriter-delete-retype",
      "props": {
        "prefix": "Built to be ",
        "background": "#0F1217",
        "ink": "#ECEFF4",
        "accent": "#4FE3A6",
        "cursorColor": "#4FE3A6"
      }
    }
  ]
}

Typewriter delete & retype props

21 parameters — change any of them to make the motion yours.

PropDefaultWhat it does
prefix"Built to be "lead-in typed once and kept (include a trailing space if the phrase follows directly)
phrases["fast.","secure.","simple."]phrases typed, held and deleted one after another
typotrueevery second phrase gets a mistyped letter that is noticed and corrected
deleteStyle"backspace"backspace (letter by letter, speeding up) | select (highlight the phrase, then delete at once)
looptruedelete the last phrase too (false = last phrase stays on screen)
typeCps12typing speed in characters per second
deleteCps26backspace speed in characters per second
hold38frames a finished phrase stays before deleting
startAt10frame typing starts
cursor"bar"bar | block | underscore
align"left"left (anchored, block centred on screen) | center
font"mono"font role (mono looks most typed)
size120max font size in u; shrinks so the longest line fits
weight700font weight
tracking0letter spacing in em
seed5keystroke-rhythm seed
background"#0F1217"background colour; "transparent" for an overlay
ink"#ECEFF4"lead-in colour
accent"#4FE3A6"phrase colour
cursorColor"#4FE3A6"caret colour
selectColor"rgba(79,227,166,0.28)"selection highlight colour (select delete style)

Notes & credits

Technique sources:

  • original — generic kinetic-type effect (R3)