Skip to content
h v3.13.3
Search the docs
Find a component, section or page.

Generation progress

A progress strip for a long generation, with steps, timer and a failed state.

Writing the proposal 2/5 0s

Outlining three sections

Writing the proposal: Outlining three sections
Waiting for the model
Waiting for the model

Installation

pnpm add @heyramzi/ui

Usage

import { GenerationProgress } from "@heyramzi/ui/ai/generation-progress";
<GenerationProgress
  status="generating"
  label="Writing the proposal"
  progress={{ completed: 2, total: 5, currentStep: "Writing the intro" }}
  showElapsed
/>

Keyboard and accessibility

  • The bar is a progressbar named by the label, with a value like "2 of 5" once it knows the step count.
  • A polite status says each new step, like "Writing the proposal: Outlining 3 sections", and says "Generation failed".
  • The copy of the label drawn for the shimmer is hidden from screen readers.
  • With reduced motion on, the shimmer, the pulse and the sweep stop.

API reference

status required "idle" | "generating" | "failed"
progress GenerationSteps | null
Default null
label string
showElapsed boolean
Default false
class string
Prop Type Default
status required "idle" | "generating" | "failed"
progress GenerationSteps | null null
label string
showElapsed boolean false
class string