Skip to content

StreamingReveal

Stable

Text that appears as it is written, with each new word fading in once.

Also known as streaming text, typewriter, stream

Install with npm install @tattva/ui (setup), or copy the code from the kit in Downloads.

A reply as it is written

Sales rose 12% in the third quarter. Most of the gain came from

Replay writes the text again. Only the newest words are faint.

When to use it

Shows a reply as it is being written, fading in each new word once. Words already shown never move or fade again, so the text stays calm to read.

Made of: Words · Spaces

Use it for

  • The text of an assistant reply while it streams in.
  • Any text that grows word by word from a live source.

Not for

  • Content that appears all at once: use Reveal.
  • A whole reply with its avatar, cursor and actions: use Message.
  • Showing the assistant is busy before any words arrive: use TypingIndicator.

Do and avoid

Your flight lands at 9:40. The hotel lets you check in from 2 pm.

Do. Words appear once and stay still, so the text is calm to read.

Your flight lands at 9:40. The hotel lets you

Avoid. Extra blur and slide on new words make the reply jumpy to read.

Do

  • Add words in place and let lines wrap on their own.
  • Pass text in at a steady pace, about 30 times a second at most.
  • Mark the reply as finished when it ends so the last word shows.
  • Let Message handle what screen readers announce.

Avoid

  • Do not animate height or position.
  • Do not rebuild old words, which would replay their fade.
  • Do not add your own blur or slide on top of the built-in fade.
  • Do not slow the text down to show off the effect.

On a phone

  • Each new word fades in from a faint blur in --dur-base (220ms) on --ease-arrive, and new words add to the end so the text does not jump as it streams.
  • With reduced motion turned on in the phone settings, the text just appears.

Seen in products

  • Streamdown fades in each word over a short time and suggests a slightly longer fade, or a blur for fast replies.
  • Upstash describes limiting updates to about 30 a second and showing whole words.
  • Both say words already shown must not animate again and that only fading should change.

Build your next AI screen with Tattva.

Free and open, with the code. Start in one line.

Get started