Image Generation

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.

Default—
status?
"complete" | "queued" | "generating" | "refining" | "error"
Defaultgenerating
label?
string

Accessible description. Defaults to a description derived from prompt.

Default—
prompt?
string
Default—
resolution?
string
Default1024 × 1024
aspectRatio?
AspectRatio

CSS aspect ratio reserved before generated media is available.

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

Lets the active dither cluster follow fine-pointer movement.

Defaulttrue
statusText?
string
Default—
showStatus?
boolean
Defaulttrue
onRetry?
(() => void)
Default—
className?
string
Default—
mediaClassName?
string
Default—
statusClassName?
string
Default—

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.

Also on React Native. A dot field you can steer while the image forms.

Updated