Updated
Image Generation
ProCustomize
Cell6px
Delay1.5s
Sweep3.2s
Band0.22
Width320px
Installation
ProImage Generation is a Pro component
Sign in to see the source, or install it with a license key. The live preview and props above are free to explore.
Install with a key
- Add the Pro registry to
components.json:components.json { "registries": { "@uibrik-pro": { "url": "https://uibrik.com/r/pro/{name}.json", "headers": { "Authorization": "Bearer ${UIBRIK_LICENSE}" } } } } - Put your key in
.env.localand add that file to.gitignore:.env.local UIBRIK_LICENSE=your-license-key - Install it:
Terminal npx shadcn@latest add @uibrik-pro/image-generation
Loading your installation…
Usage
import { ImageGeneration } from "@/components/uibrik/image-generation/ImageGeneration";<ImageGeneration src="/registry/image-generation/image-1000.webp" prompt="Generate an image of beautiful mountains" cell={6} delay={1.5} sweep={3.2} band={0.22} width={320} onDone={() => {}}/>Where to use Image Generation
AI image apps
A dither field resolving into the picture shows generation progress instead of a spinner.
Pairs with Prompt Input
Image loading states
The placeholder works for any slow image, not only AI output.
Pairs with Skeleton
Creative AI landing pages
Watching a picture emerge explains the product in one loop.
Props
ImageGeneration- prompt
- Type string
- "Generate an image of beautiful mountains"
- Request shown above the card. Empty hides it.
- cell
- Type number
- 6
- Square size of the dither field.
- delay
- Type number
- 1.5
- Pure dither before the picture starts to appear.
- sweep
- Type number
- 3.2
- How long the reveal band takes to travel down.
- band
- Type number
- 0.22
- Band height as a share of the card.
- width
- Type number
- 320
- Card width; the picture is 2:3.
- srcrequired
- Type string
- –
- The generated picture.
- onDone
- Type () => void
- –
- Called once the picture is fully revealed.
- className
- Type string
- –
- Classes for the wrapper.