TX-01Texts
Typing Text
Typewriter text that makes the odd typo and corrects it, erases by selecting, and blinks its caret only when idle, built with React and Motion.
PROKinetic Type Hero and more like it are in Kokonut UI Pro
Installation
Typing Text is a free, open-source React component in the Kokonut UI Texts collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/type-writer.tsx, so the code is yours to change.
npx shadcn@latest add @kokonutui/type-writerOr add it by hand: install its packages, then copy the source from Copy code above into components/kokonutui/type-writer.tsx.
npm install motionUsage
import TypewriterTitle from "@/components/kokonutui/type-writer";
export default function Example() {
return <TypewriterTitle deleteMode="select" typos={0.06} />;
}Props
sequencesTypewriterSequence[]Default built-intypingSpeednumberDefault 50startDelaynumberDefault 200autoLoopbooleanDefault trueloopDelaynumberDefault 1000deleteSpeednumberDefault 30pauseBeforeDeletenumberDefault 1000naturalVariancebooleanDefault truedeleteMode"backspace" | "select"Default "backspace"How a phrase is erased. "backspace" removes it one character at a time; "select" highlights it right to left, as with Shift+Home, then cuts it in one go.
typosboolean | numberDefault falseHit a neighbouring key now and then, pause, backspace and correct it. true is about a 4% chance per letter; a number sets the chance.
seednumberDefault 7Seed for the variance and typos, so every visit types the same way.
pausedbooleanDefault falseStops the typing where it is. Wire it to a pause control to let users stop the endless loop (WCAG 2.2.2). It also pauses while off screen.
asTypewriterElementDefault "div"Element to render, e.g. h1 when it is the page title.
classNamestringClasses for the wrapper. Its width sets the font size.
textClassNamestringClasses for the text itself, e.g. to fix the font size.
TypewriterSequence
textrequiredstringdeleteAfterbooleanpauseAfternumberTypewriterElement
type TypewriterElement = "div" | "p" | "span" | "h1" | "h2" | "h3";Dependencies
| Needs | Version | Comes from |
|---|---|---|
motion | ^12.23.25 | npm, installed by the CLI |
cn from lib/utils.ts | shadcn init | |
| React | 19 | Your app |
| Tailwind CSS | 4 | Your app |
No provider, font or global CSS to set up: the file works as soon as it lands.

