Gen cancel (Pro)
ProIncluded in $99Cancelling an image generation, shown as the half made image freezing where it got to.
On this page
ProWhile it generates, the picture clears out of coloured noise. Cancel, and the half formed image slips back a step and freezes, its colour draining, with how far it got.
While it generates, the picture clears out of coloured noise as the steps land. Cancel, and the half formed image slips back a step into the grain and freezes there, its colour draining, while the card says how far it got with a way to try again. Finishing clears the last of the grain.
Installation
Needs chatcn Pro
This command works with a Pro license, along with every Pro component.
Or start free: sign up and get three Pro components on us, with a new one every month.
Usage
import { GenCancel } from "@/components/ui/chatcn/pro/gen-cancel"
<GenCancel status={status} progress={progress} onCancel={cancel} onRetry={retry} prompt={prompt} />The demo paints its picture from your theme's colours on a canvas. In your app, draw your real preview into the same pipeline, or use it as the waiting state.
Props
| Prop | Type | Notes |
|---|---|---|
status | "generating" | "done" | "cancelled" | |
progress | number | 0 to 1 |
onCancel / onRetry | () => void | |
prompt | string | For the image's name |
Accessibility
- The canvas is an image named with the prompt and progress; the status line is polite.
Motion
- Noise and blur follow progress through an eased follower; cancelling runs it back faster. Reduced motion: it jumps to each state.