Import GeneratedImage from @prepared911/ui/generated-image.
Props are a union: meaningful with alt, or decorative.
alt | LocalizedMessage | required unless decorative | Accessible description |
decorative | true | | Empty alt, aria-hidden; alt is then not allowed |
url | string | | Wins over base64 when not empty |
base64 | string | | Data without the data: prefix |
mediaType | string | image/png | Must be an image/* type. Case, surrounding whitespace and parameters (;charset=…, ;base64) are dropped |
className | string | | Appended to the frame |
ref | Ref<HTMLDivElement> | | The frame |
data-* attributes pass to the frame. Reserved design-system state names are dropped with a warning.
GeneratedImage and the type GeneratedImageProps.
alt | LocalizedMessage | — | Accessible description of the picture.
A decorative image has no description. |
base64 | string | — | Base64-encoded image data, as an AI SDK file part carries it. Used when url is empty. |
className | string | — | @deprecated Pass layout through enum props and shipped parts. Request a missing case via find-pattern. |
decorative | boolean | — | The image is meaningful: omit it or pass false.
Marks the picture decorative: an empty alt, hidden from assistive technology. |
mediaType | string | "image/png" | MIME type of the base64 data. Case, whitespace and parameters are dropped. It must be an image type: Image rejects any other data: URL in development. |
ref | Ref<HTMLDivElement> | — | Ref to the frame element. |
url | string | — | Image URL. It wins over base64 when it is not empty. |
Interactive examples and edge cases for this component are in Storybook.