Typewriter Effect Generator

โ† Back to DashboardDeveloper Tools

Typewriter Effect Generator

Customize and preview smooth text typing and deleting animations in real time, and export clean code for React, Vanilla JS, and pure CSS.

Effect Settings
Separate phrases with newlines (Enter)
Quick Presets
Typing Speed80 ms
Deleting Speed40 ms
Pause Duration1.5 s
typewriter-preview.sh
|
Typing (1/4)
0 chars
Changes to settings update the live terminal preview instantly.
Generated Source Code
import React, { useState, useEffect } from "react";

export function Typewriter() {
  const words = [
  "Hello, World! ๐Ÿ‘‹",
  "Build beautiful web applications.",
  "100% Client-Side Typewriter Effect.",
  "Fast, smooth, and fully customizable."
];
  const [currentText, setCurrentText] = useState("");
  const [wordIdx, setWordIdx] = useState(0);
  const [isDeleting, setIsDeleting] = useState(false);

  useEffect(() => {
    const currentWord = words[wordIdx % words.length];
    let timer;

    if (!isDeleting) {
      if (currentText.length < currentWord.length) {
        timer = setTimeout(() => {
          setCurrentText(currentWord.slice(0, currentText.length + 1));
        }, 80);
      } else {
        timer = setTimeout(() => setIsDeleting(true), 1500);
      }
    } else {
      if (currentText.length > 0) {
        timer = setTimeout(() => {
          setCurrentText(currentWord.slice(0, currentText.length - 1));
        }, 40);
      } else {
        setIsDeleting(false);
        setWordIdx((prev) => (prev + 1) % words.length);
      }
    }
    return () => clearTimeout(timer);
  }, [currentText, isDeleting, wordIdx]);

  return (
    <div className="font-mono text-2xl font-bold text-slate-100 flex items-center">
      <span>{currentText}</span>
      <span className="animate-pulse ml-0.5 text-blue-500">|</span>
    </div>
  );
}

How to Use Typewriter Effect Generator

Create captivating typewriter header effects for modern landing pages and portfolio websites.

Real-Time Terminal Preview

Watch your phrases type out and delete smoothly inside a stylish dark terminal frame with responsive controls.

Fine-Grained Speed & Cursor Controls

Dial in exact typing speed, backspace speed, pause delays, and choose between pipe, underscore, or block cursors.

Production-Ready Code Export

Generate copy-pasteable snippets for React components, Vanilla HTML/JS scripts, or lightweight CSS keyframes.

Quick Brain Break

How about a quick mini-game to clear your mind?

A refreshing collection of free classic browser games to recharge your brain during work.