AI Image Reveal
NEWA particle cloud gathers into a finished image, then resolves from a noisy mosaic into a sharp result.
Generating…
Generating image
Installation
Add the component directly to your repository using shadcn CLI:
npx shadcn@latest add Surajmaurya1/easyui/ai-image-reveal
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| src | string | null | undefined | Public image URL to reveal; omit while generating. |
| alt | string | — | Alternative text for the finished image. |
| generating | boolean | derived from src | Force the generating state while an image URL is present. |
| aspectRatio | number | 1 | Width divided by height of the image frame. |
| prompt | string | — | Optional caption displayed below the image. |
| generatingLabel | string | Generating… | Status pill label while waiting or gathering. |
| colors | string[] | — | Optional particle palette as hex colors. |
| density | number | 1 | Particle density multiplier from 0.4 to 2. |
| duration | number | 3.2 | Reveal duration in seconds. |
| crossOrigin | "anonymous" | "use-credentials" | "" | "anonymous" | Cross-origin mode used when loading the image. |
| onReveal | () => void | — | Called after the image reveal completes. |
| onImageError | () => void | — | Called if the image URL cannot be loaded. |
| ref | AIImageRevealHandle | — | Exposes replay() to play the reveal again. |