jc-image
The schema defines the following properties:
Property | Type | Required | Description |
type | component.image | true | |
instanceId | InstanceId | Expression | false | |
when | Expression | boolean | false | |
options | Image Options | true | |
Properties of the options object:
Property | Type | Required | Description |
title | string | Expression | TextWithFormat | TextLocale | false | Title that could be displayed on/next to the image based on current context. |
subtitle | string | Expression | TextWithFormat | TextLocale | false | Subtitle that could be displayed on/next to the image based on current context. |
resizeMode | ResizeMode | false | Determines how to resize the image when the frame doesn't match the raw image dimensions.'cover': Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or larger than the corresponding dimension of the view (minus padding).'contain': Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or less than the corresponding dimension of the view (minus padding).'stretch': Scale width and height independently, This may change the aspect ratio of the src.'center': Scale the image down so that it is completely visible, if bigger than the area of the view. The image will not be scaled up. |
source | JCImageURISource | true | The image source (either a remote URL or a local file resource). The currently supported formats are png, jpg, jpeg, bmp, gif, webp (Android only), psd (iOS only). |
height | number | string | false | Change constrain of image height. Remember to use a proper resizeMode toachieve the best results in all different device resolutions |
width | number | string | false | Change constrain of image width. Remember to use a proper resizeMode toachieve the best results in all different device resolutions |
onPress | false | Action Keg component that will be triggered by pressing on this image. |
Title that could be displayed on/next to the image based on current context.
Subtitle that could be displayed on/next to the image based on current context.
Determines how to resize the image when the frame doesn't match the raw image dimensions.
'cover': Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or larger than the corresponding dimension of the view (minus padding).
'contain': Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or less than the corresponding dimension of the view (minus padding).
'stretch': Scale width and height independently, This may change the aspect ratio of the src.
'center': Scale the image down so that it is completely visible, if bigger than the area of the view. The image will not be scaled up.
The image source (either a remote URL or a local file resource). The currently supported formats are png, jpg, jpeg, bmp, gif, webp (Android only), psd (iOS only).
Change constrain of image height. Remember to use a proper resizeMode to achieve the best results in all different device resolutions
The object must be any of the following types:
Default: 196
Change constrain of image width. Remember to use a proper resizeMode to achieve the best results in all different device resolutions
The object must be any of the following types:
Action Keg component that will be triggered by pressing on this image.
The schema defines the following additional types:
This element must be one of the following enum values:
- contain
- cover
- stretch
- center
Properties of the JCImageURISource object:
Property | Type | Required | Description |
uri | string | string | true | |
The object must be any of the following types:
