Typewriter

Types, pauses, deletes and cycles through words, with a blinking caret.

no dependenciesMIT · free

We build websites., products., brands., waves.

Installation

npx shadcn@latest add https://ombakui.com/r/typewriter.json

Usage

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

<h1>
  We build <Typewriter words={["websites.", "products.", "brands."]} />
</h1>

Props

PropTypeDefaultDescription
words*string[]–Words or phrases to cycle through.
asElementType"span"HTML tag to render.
typeSpeednumber70Milliseconds per typed character.
deleteSpeednumber35Milliseconds per deleted character.
pausenumber1600Milliseconds to hold a finished word.
loopbooleantrueKeep cycling forever; when false, stops on the last word.
cursorbooleantrueShow a blinking caret.
classNamestring–
cursorClassNamestring–Classes for the caret, e.g. a color.