Toggle Sidebar B
AppearanceLight & dark mode D

Text Type

Typewriter effect with blinking cursor and adjustable typing cadence.

Default

Every prop is wired to the controls underneath. Any change restarts the typing from the first sentence.

Light previewReplay previewOpen in new tab
_

Customize

Cursor Character
Typing Speed75ms
Pause Duration1500ms
Deleting Speed50ms
Cursor Blink Duration0.5s
Variable Speed Min60ms
Variable Speed Max120ms

API Reference

TextType

PropTypeDefaultDescription
textstring | string[]-Text or array of texts to type out.
asstring"div"HTML tag to render the component as.
typingSpeednumber50Speed of typing in milliseconds.
initialDelaynumber0Initial delay before typing starts.
pauseDurationnumber2000Time to wait between typing and deleting.
deletingSpeednumber30Speed of deleting characters.
loopbooleantrueWhether to loop through texts array.
showCursorbooleantrueWhether to show the cursor.
hideCursorWhileTypingbooleanfalseHide cursor while typing.
cursorCharacterstring"|"Character to use as cursor.
cursorBlinkDurationnumber0.5Animation duration for cursor blinking.
cursorClassNamestring""Optional class name for cursor styling.
textColorsstring[][]Array of colors for each sentence.
variableSpeed{ min: number, max: number }undefinedRandom typing speed within range for human-like feel.
startOnVisiblebooleanfalseStart typing when component is visible in viewport.
reverseModebooleanfalseType backwards (right to left).

TextType events

PropTypeDefaultDescription
sentence-complete(sentence: string, index: number) => void-Emitted after each sentence is finished and deleted.

Accessibility

Keyboard shortcuts and ARIA behavior.

  • Screen readers read whatever has been typed so far, so a long sentence is announced in pieces. For critical copy, render the full text visually hidden next to it.