Give it the texts: it types each one, holds it, erases it, and types the next.
hero-heading.tsx
TextTypewriter
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| paused | boolean | — | The pause of the user or the page (controlled). |
| default | boolean | — | The first pause when paused is not given (uncontrolled). Default false. |
| on | — | Called when the pause changes. | |
| pause | boolean | — | 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. |
| locale | string | — | The BCP 47 locale for the letter and word split (Intl.Segmenter). Default: the DisplayLocaleProvider locale, else "en-US". |
| texts | readonly string[] | — | The texts to type, in order. One text types once; more texts type, hold, and delete in turn. |
| loop | boolean | texts.length > 1 | Start 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. |
| type | number | TYPEWRITER_TIMING.typeSpeed | Seconds per letter typed. Default 0.05. |
| delete | number | TYPEWRITER_TIMING.deleteSpeed | Seconds per letter deleted. Default 0.03. |
| hold | number | TYPEWRITER_TIMING.hold | Seconds a full text stays before it is erased. Default 1.6. |
| natural | boolean | false | Type 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. |
| mistakes | number | 0 | The 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. |
| caret | boolean | true | Show the blinking caret. Default true. |
| reserve | boolean | true | Keep 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. |
| on | — | 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. |









