imageview Component
Use the imageview component to display an image within the UI.
{
"type": "imageview",
"image": {
"type": "file",
"src": "bundledimage.png"
}
}
Properties
- 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. |
- contenttintcolour
- COLOUR | null
nullsets 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.
NoteThis sets a corner radius on the
imageview, not theimage.
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"
}
}