Image Generation

A stable generated-image surface that moves from queued work through progressive refinement to a completed result without layout shift.

Preview

Waiting to generate

a quiet mountain landscape at sunset

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @beui/image-generation

API Reference

children?
ReactNode

The completed media. Pass an img, Next Image, canvas, video, or custom preview.

status?
"complete" | "error" | "queued" | "generating" | "refining"
generating
label?
string

Accessible description. Defaults to a description derived from prompt.

prompt?
string
resolution?
string
1024 × 1024
aspectRatio?
AspectRatio

CSS aspect ratio reserved before generated media is available.

1 / 1
size?
"compact" | "fluid"
compact
interactive?
boolean

Lets the active dither cluster follow fine-pointer movement.

true
statusText?
string
showStatus?
boolean
true
onRetry?
(() => void)
className?
string
mediaClassName?
string
statusClassName?
string

Composition

Place generated media inside the response row that owns its prompt and completion state.

Message
└── MessageContent
    └── ImageGeneration
        └── GeneratedMedia

Note: Message keeps the generated result attached to its assistant turn. Streaming Response carries accompanying text before or after the media result. Prompt Input collects the instruction that starts generation.

How it works

Generated media should occupy its final space before pixels are ready. The surface keeps one stable canvas while generation state progressively reveals the result, then settles into an ordinary image that remains easy to inspect.

Updated