Learn about the Image component for use in UI extensions.
Image
component renders an image. Use this component to add a logo or other visual brand identity asset, or to accentuate other content in the extension.
Images cannot exceed the width of the extension’s container at various screen sizes, and values beyond that maximum width will not be applied to the image.
Prop | Type | Description |
---|---|---|
src | String | The source of the image display. You can specify a URL or you can import the image directly if it’s within your project. Learn more about image sources. |
alt | String | The alt text for the image, similar to the alt attribute for the HTML img tag. |
href | Object | When provided, sets the URL that will open when the image is clicked. Contains the following fields:
href and an onClick action, both will be executed on button click. |
onClick | () => void | A function that will be called when the image is clicked. This function will receive no arguments and any returned values will be ignored. |
width | Number | The pixel width of the image. |
height | Number | The pixel height of the image. |
overlay | Object | Include a Modal or Panel component in this object to open it as an overlay on click. Learn more about using overlays. |
Image
component supports the following file types: .jpg
, .jpeg
, .png
, .gif
, .svg
, .webp
.src
prop specifies the source of the image, which can be a URL (shown above) or you can import the file if it’s included in your project. To import images, first add the files to your project, then import them by relative path (shown below). While there’s no specific file size limit for images bundled in projects, the total size of your project cannot exceed 50MB.