Skip to content

GenerationProgress

Experimental

Shows how a slow AI task is going: waiting, making it, ready to listen early, finishing, done, failed or cancelled.

Also known as progress, generating, render progress, progress bar

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

Try each state

Generating

About 30 seconds left

Switch the state to see each one. The percent bar shows only while making it, with a percent.

When to use it

Shows where a slow task stands, from waiting to done or failed. A placeholder the same shape as the result holds its place, so the page does not jump when it arrives.

Made of: Result area (placeholder, flat waveform or result) · Status · Time left · Listen now · Cancel, Retry or Start again · Progress bar · Error message · Credits note

Use it for

  • Making an image, video or file that takes more than a few seconds.
  • Waiting in line before the work starts: show the queue position.
  • A task that can fail and be tried again.
  • A song, voice-over or sound effect: use previewShape="audio", and streaming when the start can be played early.

Not for

  • A short wait for a chat reply: use TypingIndicator.
  • A list of steps an agent is working through: use Checklist.
  • An amount used out of a limit: use Meter.

Do and avoid

Generating

About 1 min left
Do. Real progress and a Cancel button while the image is made.

Generating

About 1 min left
Avoid. No Cancel, so people must wait for a task they no longer want.

Do

  • Make the result area the same shape as the result, so the page does not jump.
  • Offer Cancel for anything that takes more than a few seconds.
  • Say why it failed.
  • Pass percent only when you know the real progress. Without it, a moving bar shows instead.
  • For audio, use previewShape="audio" and say what is coming in previewLabel, such as "Song, about 2 minutes".
  • Say what cancelling does to credits with refundNote, when you know it.

Avoid

  • Do not fake a percent. Use the moving bar instead.
  • Do not announce every percent change. This component already avoids that.
  • Do not use amber for waiting in line. Waiting is not something the person must act on.
  • Do not remove Cancel once the task has started.
  • Do not autoplay streaming audio. Offer Listen now and let the person press it.
  • Do not draw a fake waveform in the placeholder. The flat bars say the sound is not there yet.

On a phone

  • The preview area and the status line fill the width; the status text, time left and action wrap onto new lines.
  • The preview area takes its height from the class you pass, so size it for a narrow screen.
  • Action buttons are 44px tall on a touch screen and wrap onto a new line when space is short.
  • The audio placeholder fills the width at a fixed short height, so it does not take a 16:9 block on a phone.

Seen in products

  • Runway says Gen-4 takes minutes and Gen-4 Turbo can do 10 s in about 30 s.
  • Perplexity shows a progress display of sources read and findings as they arrive (secondary).
  • Gemini Deep Research reports can run in the background (primary).

Build your next AI screen with Tattva.

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

Get started