Skip to content

Typewriter

widgetsdisplay

Reveals static text character by character

Installation

$ bunx termuijs add typewriter

Copies the source into src/components/typewriter/ and installs @termuijs/core, @termuijs/widgets.

Usage

ts
import { Typewriter } from '@termuijs/widgets'
ts
new Typewriter(text: string, style: Partial<Style> = {}, opts: TypewriterOptions = {},)

API Reference

Typewriter

PropTypeRequiredDescription
textstringrequired
speednumberoptionalCharacters revealed per tick
cursorstringoptionalCursor glyph drawn at the reveal head
#display#typewriter