Agent work
Image generation
Image generation progress, preview, and error states in one frame.
Starts when it scrolls into view
NORD FROST · DARK · RADIUS 6/10 · BASE 16PX · SHADOW
- Type
ImageGeneration- Source
image_generation.rs- Story
image-generation- Demo height
- 212 px
- Events
- None
Code
Cut from the gallery story this page runs, so it stays true.
// The demo placeholder must not read as a partially
// rendered image: a flat muted canvas behind the pulsing
// icon keeps the progress state honest until pixels
// arrive.
ImageGeneration::new("gen")
.label("Label sketch: alpine meadow, morning light")
.progress(self.sim.progress())
Events and ownership
- Who owns the state
- ImageGeneration renders state supplied by the application; it does not own durable work.
- What it emits
- This presentation surface adds no component-specific interaction event.
- What it means
- Image generation progress, preview, and error states in one frame.
- Overflow and motion
- Wide content retains context in a bounded surface; reduced motion preserves a useful state.
What the demo does and does not show
The demo above is the same Rust as the native component, compiled to WebAssembly and drawn on a WebGPU canvas — not a mock-up, a recording, or a re-implementation. What it paints is what the component paints: layout, colour from the live theme, and motion.
The live browser specimen requires WebGPU; the native component remains the authoritative runtime.
A canvas cannot stand in for the platform, so treat everything that goes through the operating system as unproven here: keyboard handling and shortcuts, screen reader semantics, text input and IME, the clipboard, file drops, and the frame rate you would get on your own GPU. Judge those in a native build. If your browser has no WebGPU, the frame says so rather than showing an empty box.