← All components
Interaction / component

Streaming Text

Request-safe word reveal with retained caller text and two local chunk-playback contexts.

Live preview
Preparing preview…

Take it with you.

SOURCE ACCESS

Preview freely. Unlock the files.

Enter the shared password to copy the complete source, download every file, and install components in your app.

Access lasts 24 hours. Your preview settings stay with you.

Component notes

  • Complete plays the submitted text in at most 32 actual local chunks and discloses the transport simulation. It sends nothing to a model service. Cancel clears the owned job.
  • Bind StreamingText to your requestId, full retained text and authoritative state. The accessible text contains the full received response, and meaningful state changes are announced without a live announcement on every chunk.
  • reduceTextStream accepts immutable requestId/sequence/text chunks, deduplicates each sequence and reconstructs out-of-order chunks. Explicit start replaces the stream; always assign a fresh requestId. Foreign or terminal chunks/notifications are ignored.
  • Pause and reduced motion show all currently received text; Replay restarts decoration without clearing received bytes or local input. A response over 20,000 code units bypasses decorative reveal and keeps the full text.
  • The caller-owned chunk example, complete request reducer, styles and motion ownership are included. No site alias, persistence or backend is required.
React 19.2Modern browsers

Chungus UI · Original project implementation; no restricted reference recipe or asset.

Props

PropTypeDefaultDescription
requestId (required)stringrequiredFresh caller job identity; must change for a new request.
text (required)stringrequiredThe full authoritative received text, kept accessible and inert.
state (required)idle | streaming | complete | error | cancelledrequiredCaller request state; decoration never changes it.
revealword | nonewordOptional decorative word reveal; terminal, long, paused or reduced views show all received text.
wordsPerSecondnumber16Bounded1–120 reveal speed.
classNamestringemptyAdditional primitive classes.
headlinestringMake room for the next idea.Complete context heading.
initialTextstringlocal sample paragraphComplete initial editable text; later edits remain local.
pausedbooleanfalseSuspend decoration without changing caller state, retained text, local input or results.
replayTokennumber0Restart decoration while retaining caller state and local work in the new contexts. Legacy Thought/Lattice Demo explicitly restarts its synthetic interaction.