Cover-image widget
The cover-image widget displays a cover image.
Example
Properties
Property |
Description |
Data type |
---|---|---|
|
JSON containing the properties that define the visual appearance of the item, as described in Context properties. |
string (JSON) |
|
Height of the element, in pixels. |
integer |
|
Unique identifier of this widget. |
string |
type
|
Rich-media type, which is always CoverImage . |
string |
|
URL of the cover image. |
string (URL) |
|
Width of the element, in pixels. |
integer |
Context properties
Context property |
Description |
Data type |
---|---|---|
|
Image alignment, which is one of: Default is |
enum |
|
Image border color, as a hex color code. |
string (hex color code) |
|
Image border radius, in pixels. |
integer |
Code sample
var obj = {
"widgetType": "form",
"widgetView": "inline",
"nodes":
[{
"id": "view1",
"controls": {
"0": {
"type": "CoverImage",
"id": "ci1",
"width": 240,
"height": 240,
"url": "https://www.w3schools.com/howto/img_nature_wide.jpg",
"context": {
"align": "left",
"imageBorderRadius": 5,
"imageBorderColor": "#000000"
}
}
}
}
],
"transitions": [
],
"initialView": "view1"
}