WebberUI

Typewriter Text

The classic typewriter effect — text typed out character by character with a blinking cursor, with looping and deletion across multiple strings.

Types text out character by character with a blinking cursor. Pass a single string, or an array of strings to loop through a "type → hold → delete" rotation.

Loading preview…
npx shadcn@latest add https://webberui.com/r/typewriter-text.json

Playground

Tune the props live — the code snippet updates as you go, so you can dial in the look you want before copying it.

0.075
0.04
1.4
<TypewriterText />

Installation

npx shadcn@latest add https://webberui.com/r/typewriter-text.json

Or, once registries are configured in components.json, install it as @webberui/typewriter-text.

Usage

import { TypewriterText } from "@/components/ui/typewriter-text";

<TypewriterText text={["Animated components", "Interactive interfaces", "Delightful experiences"]} />

Pass a single string and turn loop off for a one-shot typing effect:

<TypewriterText text="Hello, world." loop={false} />

Props

PropTypeDefaultDescription
textstring | string[]The string to type; an array loops through the strings one by one
typeSpeednumber0.075Interval between typed characters (seconds)
deleteSpeednumber0.04Interval between deleted characters (seconds)
pauseDurationnumber1.4How long a finished string is held before deletion starts (seconds)
startDelaynumber0Delay before the first run starts (seconds)
loopbooleantrueWhether to loop
cursorCharstring"|"The cursor character
showCursorbooleantrueWhether to show the cursor
cursorBlinkDurationnumber1Cursor blink cycle (seconds)
cursorClassNamestringExtra styles for the cursor

Accessibility

  • When the user has "reduce motion" enabled at the system level, the complete text is shown immediately and the cursor stops blinking
  • The container carries an aria-label (the complete sentence) and the typing process is hidden from assistive technology (aria-hidden), so what is announced is the complete content

On this page