Corpora UI

Streaming text

Streamed answer: word-by-word reveal with a caret and inline source previews.

Preview

Use the controls to explore the component's props.

Props

PropTypeDefaultDescription
paragraphs (required)(string | TStreamingToken[])[]—Each paragraph is words or tokens; { cite, title?, description?, href? } renders an InlineSource.
streamingbooleanfalseAnimate the reveal; reduced motion shows everything at once.
wordMsnumber--stream-gap (60ms fallback)Override the gap between revealed words in milliseconds.

Example

Pistachio is your fastest-growing flavor — sales are up 23% this month and margins beat vanilla by 8 points.

scoopdata.io Stone-fruit flavors trend in the same range.

import { StreamingText } from "@exegia/corpora-ui"

<StreamingText
  streaming
  paragraphs={[
    "The Iliad opens with an invocation to the Muse.",
    [{ cite: "Iliad 1.1", title: "Opening invocation" }],
  ]}
/>

Last updated on

On this page