StreamingText

Types out like a streamed reply, with a blinking caret. AI.

Open playground

About

StreamingText is a React component in the AI category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { StreamingText } from "@ashutoshswamy/smoui" and set text, speed, replayKey.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

TSX
import { StreamingText } from "@ashutoshswamy/smoui";

<StreamingText text="Reduced motion is respected by default." speed={45} />

Props 3

text

Full text to stream.

string
speed

Characters per second.

numberdefault 45
replayKey

Change to replay the stream.

stringnumber