Cover-image widget

The cover-image widget displays a cover image.

Example

Properties

Property

Description

Data type

context

JSONClosed containing the properties that define the visual appearance of the item, as described in Context properties.

string (JSON)

height

Height of the element, in pixels.

integer

id

Unique identifier of this widget.

string

type Rich-media type, which is always CoverImage. string

URL

URL of the cover image.

string (URL)

width

Width of the element, in pixels.

integer

Context properties

Context property

Description

Data type

align

Image alignment, which is one of: left|right|center.

Default is center.

enum

imageBorderColor

Image border color, as a hex color code.

string (hex color code)

imageBorderRadius

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"
}