Generation progress
A progress strip for a long generation, with steps, timer and a failed state.
Writing the proposal
Outlining three sections
Waiting for the model
Installation
pnpm add @heyramzi/uiUsage
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
statusrequired"idle" | "generating" | "failed"progressGenerationSteps | null- Default
null labelstringshowElapsedboolean- Default
false classstring
| Prop | Type | Default |
|---|---|---|
status required | "idle" | "generating" | "failed" | |
progress | GenerationSteps | null | null |
label | string | |
showElapsed | boolean | false |
class | string |