joyco

Typewriter

Text 2

About

A text component that animates cycling through a list of phrases with a realistic typing and deleting caret effect.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Typewriter to your project and fits it to your theme.

Code

How Typewriter is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import { Typewriter } from "@/components/ui/typewriter";

export default function TypewriterDemo() {
  return (
    <div className="flex min-h-[120px] items-center justify-center px-6 py-12">
      <span className="text-foreground min-w-0 font-mono text-sm leading-6 whitespace-pre">
        npx shadcn@latest add{" "}
        <Typewriter
          msPerChar={55}
          pauseMs={650}
          deleteMsPerChar={40}
          gapMs={180}
          texts={["joyco/mobile-menu", "joyco/typewriter", "joyco/chat"]}
          className='**:data-[slot="caret"]:[animation:pulse_0.75s_ease-in-out_infinite] **:data-[slot="caret"]:opacity-0'
        />
      </span>
    </div>
  );
}

More by joyco

View all
  • Image Sequence

    Image Sequence

    70
  • Infinite List

    Infinite List

    67
  • Chat

    Chat

    23
  • File Dropzone

    File Dropzone

    21
  • HLS Video Player

    HLS Video Player

    18
  • Action Hint

    Action Hint

    17
  • Spritesheet Sequencer

    Spritesheet Sequencer

    12
  • Snake Game

    Snake Game

    3

More in Text

View all
  • Vertical Cut Reveal Characters

    Vertical Cut Reveal Characters

    110
  • Blur Reveal

    Blur Reveal

    313
  • Vapour Text Effect

    Vapour Text Effect

    2K
  • NeonRGBTextEffect

    NeonRGBTextEffect

    145
  • Rainbow Text Effect

    Rainbow Text Effect

    47
  • Shine Border

    Shine Border

    968
  • Apple Hello Effect

    Apple Hello Effect

    620
  • Text Highlight

    Text Highlight

    72