Element Types
These are definitions and descriptions of the various element types that are available. Any properties not explained on Managing Page Elements is explained here.
Title element
{
"type": "Title",
"id": "615d9a0b792a81c7e32841ef",
"order": 0,
"backgroundColor": "#f7f7f7",
"foregroundColor": "#111",
"padding": "2",
"margin": "2,0,2,0",
"textAlignment": "Center",
"font": "Roboto",
"content": "Welcome to the Landing",
"level": 1,
"bold": false,
"italic": false,
"underline": false
}
level
Heading level. Valid values are from 1 through 5.
bold
Whether the text content should be bolded. Defaults to false
.
italic
Whether the text content should be italicized. Defaults to false
.
underline
Whether the text content should be underlined. Defaults to false
.
Text block element
{
"type": "TextBlock",
"id": "615db88a0f5018f08437bff5",
"order": 1,
"backgroundColor": "#f7f7f7",
"foregroundColor": "#111",
"padding": "2",
"margin": "2,0,2,0",
"textAlignment": "Left",
"font": "Roboto",
"content": "One row\n\nAnd another section",
"fontSize": 16
}
fontSize
The font size (in pixels) of the text content. Defaults to 16
.
Button element
{
"type": "Button",
"id": "615db9a50f5018f08437bff6",
"order": 2,
"backgroundColor": "#f7f7f7",
"foregroundColor": "#111",
"padding": "2",
"margin": "2,0,2,0",
"textAlignment": "Left",
"font": "Roboto",
"content": "Click me",
"link": "https://example.com",
"buttonType": "Standalone",
"size": null,
"buttonColor": "#89b642"
}
buttonType
The type of button to render. Valid values are Standalone
and Block
. Defaults to Standalone
.
size
Size modifier for the button, smaller or larger. Valid values are sm
, lg
and null
. Defaults to null
.
buttonColor
The color (in hex) that is used for the button. Defaults to #89b642
.
Image element
{
"type": "Image",
"id": "615dba140f5018f08437bff7",
"order": 3,
"backgroundColor": "#f7f7f7",
"foregroundColor": "#111",
"padding": "2",
"margin": "2,0,2,0",
"link": "https://example.com/cool-pic.png",
"responsive": true,
"alignment": "Center",
"height": null,
"width": null,
"alt": "Image not available"
}
Video element
{
"type": "Video",
"id": "615dba8b0f5018f08437bff8",
"order": 4,
"backgroundColor": "#f7f7f7",
"foregroundColor": "#111",
"padding": "2",
"margin": "2,0,2,0",
"link": "https://example.com/cool-vid.mp4",
"responsive": true,
"alignment": "Center",
"height": null,
"width": null,
"alt": "Video not available",
"previewLink": "https://example.com/cool-preview.png",
"showControls": false,
"autoplay": false,
"loop": false,
"muted": false,
"embed": false
}
previewLink
A URL to a preview image to display when the video isn’t playing. Optional, defaults to null
.
showControls
Whether to display (or hide) video playback controls. Defaults to false
.
autoplay
Whether to start the video as soon as it’s loaded. Defaults to false
.
loop
Whether to loop the video when it ends. Defaults to false
.
muted
Whether the sound in the video should be muted. Defaults to false
.
embed
Whether the video should be rendered as an embed (i.e. iframe) and not as a native video. Defaults to false
.
Common properties
These properties may appear on several types and work the same way on all of them unless noted otherwise.
textAlignment
The alignment of text content in the element. Valid values are Left
, Center
, Right
and Justified
. Defaults to Left
.
alignment
The alignment of media content in the element block. Valid values are Left
, Center
and Right
. Defaults to Center
.
font
The font used for text in the element. Accepts any common web font.
content
Text content of the element. For text blocks this is parsed as Markdown when rendered.
link
A URL to the linked content of the element. For videos and images this is the video or image, and for buttons it’s the destination when it is clicked.
responsive
Whether to scale the video or image responsively. Defaults to true
.
height
The height of the video or image (in pixels). Ignored if scaling responsively. Optional, defaults to null
.
width
The width of the video or image (in pixels). Ignored if scaling responsively. Optional, defaults to null
.
alt
The alternative text to display if the video or image can’t be loaded or displayed. Optional, defaults to null
.