imageview Component

Use the imageview component to display an image within the UI.

{
  "type": "imageview",
  "image": {
    "type": "file",
    "src": "bundledimage.png"
  }
}

Properties

image
IMAGE | null [getter]
null removes the image

The IMAGE displayed in this image view.

resize
ENUM
Default: "fit"

The resize mode if the image is a different size or aspect to the image view.

Value Description
"fit" Fits the image in the available space, retaining the aspect ratio. May add invisible space.
"fill" Fills the available space with the image, retaining the aspect ratio. May crop the image.
"stretch" Stretches the image to fill the available space. May warp the image.
"centre" Centres the image without resizing. May crop the image, or add invisible space.
background
COLOUR | null
null removes the background

The background COLOUR.

contenttintcolour
COLOUR | null
null sets the default tint colour

An optional tint COLOUR for relevant content e.g. symbols.

cornerradius
INTEGER
Default: 0, Range: 0-32

The corner radius of the image view.

Note

This sets a corner radius on the imageview, not the image.

Also see Shared Properties.

Examples

An SF Symbol in a dynamic orange tint

{
  "type": "imageview",
  "contenttintcolour": "systemOrangeColor",
  "image": {
    "size": {
      "width": 32
    },
    "type": "symbol",
    "src": "face.smiling"
  }
}