Skip to content

Image

Gen UI 2.0 standard

An image from a URL. A click opens it full-screen. Set description to say what the image shows, unless it is only decoration.

One of the 69 components in CopilotKit's standardUI. The playground's catalog extends it, so every agent here can use Image. Standard catalog docs

Props

Read from standardUI.manifestComponents in the installed @copilotkit/react-core. In A2UI 1.0 any value may also be a { "@path" } binding into the surface data model or a { "@call" } function call.

PropTypeRequiredDescription
urlstringYesImage URL
descriptionstringNoWhat the image shows, for screen readers. Leave it unset only for a decorative image
onOverlayClickAction (event or functionCall)NoSent when the user clicks the actionOverlay button and it has no href.
variant"icon" | "avatar" | "smallFeature" | "mediumFeature" | "largeFeature" | "header"NoThe size: "icon" 24px, "avatar" 40px round, "smallFeature" 160px wide, "largeFeature" and "header" full width. Default "mediumFeature": the natural size
fit"cover" | "contain" | "fill" | "none" | "scaleDown"NoCSS object-fit. Default "cover"
framebooleanNo-
positionstringNoCSS object-position, for example "top" or "50% 20%"
hideOnFailurebooleanNoDefault false
fallbackstringNoText shown in place of the image when it does not load
hoverZoombooleanNoA slight zoom on hover
lightboxbooleanNoDefault true: a click opens the image full-screen
actionOverlay{ label, icon?, href? }NoA button over the bottom-right corner of the image. Without href, it sends onOverlayClick
weightnumberNoflex-grow in a Row or Column
aspectRatiostringNo-
radius"2xs" | "xs" | "sm" | "md" | "lg" | "xl" | ... | number | string | { topLeft?, topRight?, bottomLeft?, bottomRight? }No-
widthnumber | stringNo-
heightnumber | stringNo-
maxWidthnumber | stringNo-
maxHeightnumber | stringNo-
minWidthnumber | stringNo-
minHeightnumber | stringNo-
backgroundstringNo-