Skip to content
ProLifetime access for $199, paid once, every future release included
Truffle UI

Typewriter

Pro

Types, deletes and cycles through lines with a blinking caret.

Installation

pnpm dlx shadcn@latest add @viewport/typewriter

First time? Add the @viewport registry to components.json. Setup takes one minute.

Usage

The code behind the preview above comes with Truffle Pro.

Props

PropTypeDefault
text*string | string[]

One string, or several to type, delete and cycle through.

—
speednumber

Milliseconds per typed character.

55
deleteSpeednumber

Milliseconds per deleted character.

28
pausenumber

Milliseconds to hold a finished line before deleting.

1600
loopboolean

Keep cycling through the lines.

true
caretboolean

Show the blinking caret.

true
classNamestring—

Accessibility

  • Every line is exposed once to screen readers.
  • Shows the first line statically under reduced motion.