text animations
Typewriter
Characters appear one by one as if being typed, with an optional blinking cursor. Supports multi-string looping with delete animations.
Installation
Usage
Anatomy
Good to know
textcan be one string or an array. With an array, it types each one in turn.speedanddeleteSpeedare milliseconds per character.waitTimeis the pause before deleting.loop(defaulttrue) repeats forever. Setloop={false}to stop after the last text.- Screen readers may read the text while it's half typed. Add an
aria-labelwith the full text on a wrapper if that matters. - When the user has turned on reduced motion, each string appears whole instead of letter by letter, and the cursor does not blink. Multiple strings still cycle after
waitTime.
Props
Examples
Hero Headline
Types a single string with loop={false} and a block-underscore cursor. The text resolves once and stays.
Looping Phrases
Cycles through an array of strings, deleting and retyping each. Embed inline in a heading for a classic hero pattern.
Terminal Prompt
Monospace font, dark background, and a block cursor create a CLI-style terminal animation. Use initialDelay to let the container render first.