Skip to content

StreamingText

widgetsdisplay

StreamingText: renders text that "streams in" token by token with a blinking cursor

Installation

$ bunx termuijs add streaming-text

Copies the source into src/components/streaming-text/ and installs @termuijs/core, @termuijs/motion, @termuijs/widgets.

Usage

ts
import { StreamingText } from '@termuijs/widgets'
ts
new StreamingText(options: StreamingTextOptions, style: Partial<Style> = {})

API Reference

StreamingText

PropTypeRequiredDescription
textstringrequiredFull text content
cursorstringoptionalCursor character
speednumberoptionalCharacters to reveal per tick (0 = show all immediately)
blinkIntervalnumberoptionalCursor blink interval in ms
#display#streaming-text