Skip to content

Text Typewriter

Free

Text types out letter by letter with a blinking caret, holds, then erases and types the next line.

  • Base UI
  • Motion
  • React 19
  • Tailwind CSS 4

Added Nov 14, 2026 · MIT + Commons Clause

Playground

Loading the preview

Props

Give it the texts: it types each one, holds it, erases it, and types the next.

hero-heading.tsx

TextTypewriter

<span>
PropTypeDefaultDescription
pausedboolean—The pause of the user or the page (controlled).
defaultPausedboolean—The first pause when paused is not given (uncontrolled). Default false.
onPausedChange—Called when the pause changes.
pauseOnHoverboolean—Hold the motion while a mouse is over the item, or keyboard focus is on the link or button around it (or in it). Default true.
localestring—The BCP 47 locale for the letter and word split (Intl.Segmenter). Default: the DisplayLocaleProvider locale, else "en-US".
textsRequiredreadonly string[]—The texts to type, in order. One text types once; more texts type, hold, and delete in turn.
loopbooleantexts.length > 1Start again from the first text after the last one. Default: on for more than one text.
trigger"mount""view""view"When typing starts: view (default) the first time it is on screen, mount at once.
typeSpeednumberTYPEWRITER_TIMING.typeSpeedSeconds per letter typed. Default 0.05.
deleteSpeednumberTYPEWRITER_TIMING.deleteSpeedSeconds per letter deleted. Default 0.03.
holdnumberTYPEWRITER_TIMING.holdSeconds a full text stays before it is erased. Default 1.6.
naturalbooleanfalseType like a person: the pace changes from key to key around typeSpeed, with a short pause after a space and a longer one after a comma or the end of a sentence. Default false: an even pace.
mistakesnumber0The share of letters typed wrong first, from 0 to 1. A typo is the key next to the right one on a QWERTY row (Latin letters only); the caret backs up over it and types it again. The same text always has the same typos, so the server and the browser agree. Default 0.
erase"all""character""word""character"How a full text leaves before the next one: character (default) one letter at a time, word one word at a time, or all as a select-all that shows, then goes at once.
caretbooleantrueShow the blinking caret. Default true.
reserveSpacebooleantrueKeep the size of the largest text from the start, so the page around it never moves. Default true. Turn it off for a typewriter at the end of a line, where the empty space shows.
onComplete—Called when the last text is typed and stays (never with loop).
...props<span> attributes—Every other attribute goes to the <span>, with a ref.
  • Use it when the act of typing is the point: a prompt idea, a search sample, an assistant that writes.
  • Give one text to type it once and keep it, or more texts to type, hold, and erase each in turn.
  • Set natural and mistakes for a line that must read as a person at a keyboard.
  • For text that streams in from a model as it comes, use Text Streaming.
  • For a number that counts to its value, use Count Up.
Type
progress · 50ms a letter · linear · each key shows its letter; the caret holds still
Erase
progress · 30ms a letter · linear · the letters go from the end; `word` takes a word every 150ms
Select all
none · the full text shows as selected for 600ms with no caret, then goes at once
Caret
none · while it waits the caret blinks on a 1s loop, half on and half off; it stops off screen
  1. AddedText Typewriter.
Open the release