Skip to content

Typing Animation

The TypingAnimation component reveals text one character at a time, simulating real-time text generation. It’s commonly used for AI assistant responses and chat interfaces. Since it extends the Text component, it accepts all of Text’s styling props.

Playground

Installation

import { TypingAnimation } from "@harnessio/ui/components";
// Basic usage
<TypingAnimation text="Hello, world!" />
// With custom speed and delay
<TypingAnimation text="Welcome to the chat!" typingSpeed={30} delay={500} />
// With a completion callback
<TypingAnimation
text="Processing complete."
onComplete={() => console.log("Typing finished!")}
/>
// With Text styling
<TypingAnimation text="Important message" variant="heading-small" color="foreground-1" />;