Skip to content
Premium & Brand

Typing Text

A typewriter that types one or more phrases with a blinking caret.

Import

tsx
import { TypingText } from "@cronus-ui/ui";
bash
npx cronus-ui add typing-text

Examples

API Reference

Generated from the component's exported types.

TypingTextProps

Extends Omit<HTMLAttributes<HTMLSpanElement>, "children">

Skip TypingTextProps props table
PropTypeDefaultDescription
ref
Ref<HTMLSpanElement>
text*
string | string[]Phrases to type. A single string is treated as one phrase. When more than one is provided the component types, pauses, deletes, and moves on.
typingSpeed
number50Milliseconds per typed character.
deletingSpeed
number30Milliseconds per deleted character.
pause
number1400Milliseconds to rest on a finished phrase before deleting.
loop
booleanLoop back to the first phrase after the last. Defaults to `true` when more than one phrase is provided.
reducedMotion
TypingTextMotionPreference"respect"How `prefers-reduced-motion` is honoured. Defaults to `"respect"` (show the current phrase in full). `"always"` forces the typewriter; `"never"` always shows the first phrase statically.