Film developNew
A generated image comes up like a print in the tray: a soft field of its colours, then pools of focus opening through it.
Used forStreaming generatorsPhoto editorsUpscalers and restorersAI headshots
Install with the shadcn CLI
Registered the namespace? Then it’s shadcn add @hairline/film-develop. Set it up
Templates
Need the whole page?
61 Next.js landing pages, each designed from scratch. Try any of them live; one is $39, all of them $159, and 6 are free.
Where it’s used
Streaming generators
Show the model’s preview frames, deep in blur, as progress rises.
Photo editors
A filter or a relight developing over the photo.
Upscalers and restorers
The restored photo developing out of the old one.
AI headshots
Portraits arriving one by one in a studio app.
What it handles for you
Previews from diffusion models are noisy and half-formed; shown raw they look broken, and hidden they leave people staring at a spinner.
Uses your preview
A streamed preview stays deep in blur and clears with your progress, so people see it coming without the noise.
Develops, never pops
The final image comes up through soft colour and then pools of focus, middle first.
Organic front
Focus spreads through noise, so there are no bars or lines crossing the picture.
Any image host
It only draws the image, never reads it, so it needs no CORS.
Honest progress
A rolling percentage when your API reports one, and the preview’s blur follows it.
Failure designed
A failed generation says so with Try again.
Overview
For image APIs that tell you how far along they are. While your generation runs, the frame is a developing tray: soft colour drifting in it, or, if your API streams a low-resolution preview, that preview held deep in blur and clearing a little as your progress rises. When the final image has loaded it develops like a print: a soft field of its own colours first, then pools of focus open through it on an organic front, the middle first, until the whole picture is sharp, in 1.7s. It needs no CORS, so it works with any image host.
States
- waiting
- Without a preview, two soft colour fields drift in the tray over 5.5s. With one, the preview sits scaled 110% under blur(22px), easing to blur(10px) as progress reaches 1.
- developing
- Once the final image has decoded: a soft field of its own colours (a 14-pixel copy scaled up), a finer field fading in from 12%, and the sharp print through a noise mask whose pools open from the middle over 1.7s.
- shown
- The plain image. onReady fires.
- failed
- The tray with “This image couldn’t be created.” and Try again when onRetry is passed.
Usage
Works with
Polling your generation API
Start a generation, poll its status, and hand the component the real state. Any API that reports generating, ready and failed works the same way.
Props
- src
- string
- The generated image. It can arrive before or with status "ready"; the reveal waits until it has loaded and decoded.
- status
- "generating" | "ready" | "error"
- Your generation’s real state. Nothing plays on a timer.
- progress
- number
- 0 to 1, if your API reports it. Shown as a small rolling figure; without it, no number is shown.
- alt
- string
- The image’s text alternative, usually its prompt.
- crossOrigin
- "anonymous" | "use-credentials"
- Set it when your image host sends CORS headers.
- onReady
- () => void
- Called once the reveal has played, or the image is shown without one.
- onRetry
- () => void
- Shows Try again when the generation fails.
- labels
- { generating?, ready?, failed?, retry? }
- Words for the progress tag, the announcements and the failure.
- className
- string
- Size the frame here, e.g. "aspect-square w-72".
- preview
- string
- A low-resolution preview your API streams while it works. Shown deep in blur, clearing with progress.
Accessibility and motion
- It follows your status: it waits while "generating", and plays only once status is "ready" and the image has loaded and decoded (img.decode), so it can never finish before the picture does. An image that was already there when the page loaded is simply shown.
- The figure has aria-busy while it waits, and a status line announces Generating, Image ready or the failure; the image keeps its alt text.
- Each frame draws the soft field, the finer field and the masked print on one canvas; the focus mask is 64 × 80 and scaled up smoothly, so its edges stay soft.
- Under reduced motion the image appears in place, with no drift while waiting.
Requirements
React 19, Tailwind CSS v4 and shadcn/ui theme variables (any style, light and dark). Icons from lucide-react.
The CLI also installs Number roll.
Source
Registry item: /r/film-develop.json


