Mug mockupReady
Asset Card
Media · AssetCard
A generated image or asset: its state (queued, generating, ready, failed), a watermark badge, the version stepper "‹ 2/3 ›", "Make current", "Regenerate" with a prompt and download.
versionsare the asset's versions (src,prompt,state,error,downloadHref);version/onVersionChangecontrol which one is shown (default thecurrentone).currentmarks the version in use;onMakeCurrent(index)shows "Make current" on the others.stateis a new generation's state and wins over the shown version's (the image area shimmers while generating, unless motion is reduced).onRegenerate(prompt)opens a prompt field prefilled with the version's prompt (⌘/Ctrl+Enter sends, Esc cancels).watermark(trueor your text) puts a badge on the image;metais the small line (size, cost).
Props
AssetCard
| Prop | Type | Notes |
|---|---|---|
surface? | Surface | `"glass"` for a translucent surface over a map, photo or video; `"solid"` opts out inside a glass provider. |
title | string | Required |
alt? | string | |
versions | AssetVersion[] | Required |
version? | number | The version shown (0-based); default the current one. |
defaultVersion? | number | |
onVersionChange? | (index: number) => void | |
current? | number | The version in use (badge "Current"). |
onMakeCurrent? | (index: number) => void | |
state? | AssetState | The state of a new generation (overrides the shown version's). |
watermark? | boolean | string | A badge on the image: `true` for "Watermark" or your text. |
meta? | ReactNode | "1024 × 1024 · €0.04". |
onRegenerate? | (prompt: string) => void | Shows Regenerate with a prompt field (prefilled with the version's prompt). |
prompt? | string | |
onDownload? | (index: number) => void | Without a version's `downloadHref`: Download calls this. |
ratio? | number | Width / height of the image area (default 1). |
error? | string | |
actions? | ReactNode | More buttons in the action row. |
className? | string | Extra class on the root element. |
style? | CSSProperties | Inline style on the root element. |