AI image studio
A React block (a whole screen) in Beamline's AI workspace app.
Write a prompt, pick a shape, a style and how many, and watch the variations generate side by side; each one opens full screen and can be upscaled or used as the start of more like it. Every batch stays in a history you can step back to, with its prompt and settings.
Use it for
- A product feature that makes images from text: ad creative, product shots, illustrations, social posts.
- Any generator whose people compare several variations, refine, and come back to earlier attempts.
Not for
- One image generating inside a chat answer (image-generation).
- Browsing finished images (lightbox, carousel).
- Editing an existing photo by hand (an editor; not in the kit).
Anatomy
- settings: the prompt, what to avoid (folded), shape (square, landscape, portrait, wide), style, how many (1, 2 or 4), the cost in credits and the one primary action, Generate
- batch: the newest variations in a grid; each generates in its own frame and arrives as it finishes; a ready one opens full screen, and its actions (more like this, upscale, download) wait for the pointer or focus
- history: earlier batches as a strip of thumbnails with their prompt; choosing one brings it back and Reuse puts its prompt and settings back in the form
Variants
- 0: room: settings above the batch under 48rem (history as a row underneath); settings in a column beside the batch and history from 48rem
States
- first run (example prompts to start from)
- generating (each frame breathes with its own progress; Generate becomes Generating and the form stays editable)
- partly ready (finished ones arrive while the rest keep working)
- a variation refused (says why in its frame; the others are unaffected)
- upscaling one image
- out of credits (Generate is off and says why)
- credits unknown (—)
- More like this from an older batch returns to the newest variations.
Keyboard
- ⌘/Ctrl+Enter in the prompt generates
- Each ready image is a button: Enter opens it full screen, where ←/→ step through the batch and Esc closes
- Each image's actions are reachable by Tab after it
- History thumbnails are buttons; Reuse is its own button
Motion
A frame breathes in brand-hued pixels while its image generates, then the image sharpens in block by block; a new batch slides into the grid's place as the last one joins the history; the credits roll down when spent. Nothing runs at rest: frames draw only while generating and on screen.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
batches (required) | StudioBatch[] | — | Newest first; the first is the batch on show unless one is picked from the history. |
settings / defaultSettings / onSettingsChange | StudioSettings | — | settings: Controlled image-generation settings; omit to use defaultSettings. defaultSettings: Initial generation settings; defaults to an empty prompt, square shape, first style and four images. onSettingsChange: Reports settings after a change; no callback by default. |
styles | string[] | — | Visual style choices offered to the image generator. Defaults to the built-in style choices. |
credits | number | null | — | Credits left; null when unknown. |
costPerImage | number | 1 | Cost of one generated image in the displayed currency. Defaults to 1. |
examples | string[] | — | Prompts offered on a first run. |
onGenerate (required) | (settings: StudioSettings) => void | — | Generates images using the prompt and current settings; required handler. |
onVary / onUpscale | (image: StudioImage, batch: StudioBatch) => void | — | onVary: Generates variations of the specified image; no handler by default. onUpscale: Upscales the specified generated image; no handler by default. |
onDownload | (image: StudioImage) => void | — | Downloads the selected result; no handler by default. |
className / classNames / style / ref | string / ImageStudioClassNames / CSSProperties / Ref<HTMLElement> | — | className: Classes on the documented visual root; no override by default. classNames: Classes for the named visual parts; no part overrides by default. style: Inline styles on the documented visual root; no inline overrides by default. ref: Receives the documented root element; no ref by default. |
settings | StudioSettings | — | Controlled image-generation settings; omit to use defaultSettings. |
defaultSettings | Partial<StudioSettings> | — | Initial generation settings; defaults to an empty prompt, square shape, first style and four images. |
onSettingsChange | ((settings: StudioSettings) => void) | — | Reports settings after a change; no callback by default. |
onVary | ((image: StudioImage, batch: StudioBatch) => void) | — | Generates variations of the specified image; no handler by default. |
onUpscale | ((image: StudioImage, batch: StudioBatch) => void) | — | Upscales the specified generated image; no handler by default. |
className | string | — | Classes on the documented visual root; no override by default. |
classNames | Partial<Record<"root" | "form" | "image" | "prompt" | "generate" | "batch" | "history" … | — | Classes for the named visual parts; no part overrides by default. |
style | CSSProperties | — | Inline styles on the documented visual root; no inline overrides by default. |
ref | Ref<HTMLElement> | — | Receives the documented root element; no ref by default. |
Built from
- image-generation
- lightbox
- textarea
- segmented-control
- chip-group
- button
- dropdown-menu
- tooltip
- badge
- empty-state
- slot-text
Dependencies
lucide-react
Import
import { ImageStudio } from "@beamline/image-studio";
Get it
AI image studio is part of Beamline UI. Install the parts you need in your React app as compiled packages or editable source. Get Beamline · Connect your agent
More in AI workspace
- AI agent workspace: Threads, a conversation that opens on the thread's earlier turns (each with its trace, the tools the agent called, a cited answer and any table it…
- Agent runs monitor: Every run of your agents in one place: success rate, run time, tokens and spend; the last runs as a strip of status blocks; a live table where running…
- Agent monitor: Agents in production and on test. Monitor shows every agent or one over 24 hours, 7 or 14 days: runs, tokens, estimated cost and average run time counted…
- Conversation history: Past conversations with an assistant, ready to pick up again: the list by day with bookmarks and unsent drafts, a search through every message that…
- Knowledge base manager: What your assistant knows and whether it is fresh: sources with live sync status (syncing with progress, out of date, failed with the reason and Retry)…
- Reading library: A read-it-later library: saved views that are live filters (a query with every unreadable part named, the number that matches now, saved with a name; a…
- Artifact workbench: Where the things an assistant makes are checked before they leave: every document, piece of code, small app and data result from a conversation, each…
- Voice agent: A voice agent in three layouts on one session: a workspace with the agent's orb large on a stage (the line being said shows under it, questions to ask…
- Model playground: Try one prompt on up to three models side by side: pick each model with its price and speed in view, set the system prompt, temperature and length once…
- Model inspector: A design model's objects without needing the 3D view: the model tree, where objects with the same name are told apart by id and path; the selected…
- Model issues: Issues pinned to the objects of a design model. The queue says the scope beside every count (open in the project, on the loaded models, on this version)…
- Agent builder: An agent's configuration beside an assistant that proposes tools. Ask for what the agent should do and the assistant's proposal lists each tool with why…
- Workflow composer: A workflow drafted from a sentence and finished by hand. The prompt drafts steps that arrive one by one on the graph (a draft cut short keeps what came…
- Data binding: Bind an object's properties to a view model. Each property says whether it is bound, incomplete or mismatched. A binding takes its source from the…