Skip to content
Browse docs and components

Image Generation

image-generation

An image an assistant is making: the frame keeps the image's shape from the start, a field of dots ripples while it generates, the image sharpens in through refining, and a failure offers to try again.

Responsive

Install

$npxshadcnadd@forme/image-generation

Adds the component, its registry dependencies, and the token stylesheet you import once.

API reference

Read from the source, so it is the API of the file you install. A prop marked * is required.

ImageGeneration

An image an assistant is making, from the moment it is asked for.

PropTypeDefaultDescription
childrenReactNode—The image once there is one: an img, Next's Image, a video. Shown blurred while refining.
status'error' | 'queued' | 'generating' | 'refining' | 'complete'"generating"
promptstring—What was asked for. Shown under the frame and used in the accessible name.
resolutionstring—A chip in the corner: "1024 × 1024".
aspectRatioCSSProperties["aspectRatio"]"1 / 1"Reserved before the image exists, so nothing below moves when it arrives.
progressnumber—0–100, drawn as a thin bar along the bottom while working.
statusTextstring—Replaces the status line's words.
onRetry() => void—
classNamestring—