The Display interface is deprecated and isn't supported on all Alexa devices. To add multimodal experiences to your skill, use Alexa Presentation Language (APL) instead.
To learn about APL, see Add Visuals and Audio to Your Skill.
The Alexa Design System for APL includes a set of templates that are similar to the display templates, so you can transition your skill. For details about which templates to use, see Replace display templates with responsive templates.
This reference describes specific information about display templates that you may want to include in your skill responses that create screen displays for your Alexa skill. For a reference to the Display interface directives and requests, see Display Interface Reference.
The body templates and list templates are designed to support a wide range of presentations. The following behavior applies across templates:
The textContent
field contains primaryText
, secondaryText
, and tertiaryText
.
Each list template must include at least one list item.
A hint can be included with BodyTemplate2
, BodyTemplate6
, and ListTemplate2
, by use of the Hint
directive. See Hint Directive.
For Echo Show and Fire TV Cube, the back button appears by default on each template, but can be hidden. The back button does not appear on Echo Spot, but the customer can achieve the same effect with a long swipe from the left. See Back Button Object.
The images shown below may not be to scale, and may not exactly represent what you see on the device.
When titles are displayed, they typically appear as headers, which are either left-aligned or center-aligned, depending on the template or the device.
BodyTemplate1 for simple text and image viewsTo use APL instead of this deprecated display template (recommended)
Create an APL document and use one of the following APL responsive templates:
AlexaHeadline
displays brief text over a background.AlexaDetail
displays longer text over a background. The layout scrolls, so longer text isn't cut off.For details, see Replace display templates with responsive templates.
BodyTemplate1 syntax{
"type":"BodyTemplate1",
"token": "string",
"backButton": "VISIBLE"(default) | "HIDDEN",
"backgroundImage": Image,
"title": "string",
"textContent": TextContent
}
BodyTemplate1 guidelines
Echo Show and Fire TV Cube
Echo Spot
Skills as displayed on Echo Show and Echo Spot
BodyTemplate1 on Echo Show BodyTemplate1 on Echo ShowWireframe representations for BodyTemplate1
Fire TV Cube
Echo Show
Echo Spot
BodyTemplate2 for image views and limited centered textTo use APL instead of this deprecated display template (recommended)
Create an APL document and use the AlexaDetail
responsive template to display text along with a foreground image.
For details, see Replace display templates with responsive templates.
BodyTemplate2 syntax{
"type": "BodyTemplate2",
"token": "string",
"backButton": "VISIBLE"(default) | "HIDDEN",
"backgroundImage": "Image",
"title": "string",
"image": Image,
"textContent": TextContent
}
BodyTemplate2 guidelines
Skills as displayed on Echo Show and Echo Spot
BodyTemplate2 on Echo Show BodyTemplate2 on Echo SpotWireframe representations of BodyTemplate2
Fire TV Cube
Echo Show
Echo Spot
BodyTemplate3 for image views and limited left-aligned textTo use APL instead of this deprecated display template (recommended)
Create an APL document and use the AlexaDetail
responsive template to display text along with a foreground image.
For details, see Replace display templates with responsive templates.
BodyTemplate3 syntax{
"type": "BodyTemplate3",
"token": "string",
"backButton": "VISIBLE"(default) | "HIDDEN",
"backgroundImage": "Image",
"title": "string",
"image": Image,
"textContent": TextContent
}
BodyTemplate3 guidelines
Skills as displayed on Echo Show and Echo Spot
BodyTemplate3 on Echo Show BodyTemplate3 on Echo SpotWireframe representations of BodyTemplate3
Fire TV Cube
Echo Show
Echo Spot
BodyTemplate6 for text and optional background imageTo use APL instead of this deprecated display template (recommended)
Create an APL document and use the AlexaHeadline
responsive template to display brief text over a background.
For details, see Replace display templates with responsive templates.
Display Characteristics
Echo Show and Fire TV Cube Echo SpotGuidelines for BodyTemplate6:
{
"type": "BodyTemplate6",
"token": "string",
"backButton": "VISIBLE"(default) | "HIDDEN",
"backgroundImage": Image,
"image": "Image",
"textContent": TextContent
}
Device display comparison–BodyTemplate6
Skills as displayed on Echo Show and Echo Spot
BodyTemplate6 on Echo Show BodyTemplate6 on Echo SpotWireframe representations of BodyTemplate6
Fire TV Cube
Fire TV Cube Body TextEcho Show
Echo Show Body TextEcho Spot
Echo Spot Body Text Without Hint BodyTemplate7 for scalable foreground image with optional background imageTo use APL instead of this deprecated display template (recommended)
Create an APL document and combine the following responsive components to create a similar look.
AlexaBackground
to display a background image.AlexaHeader
to display text on the top of the screen.AlexaImage
to display a scalable foreground image.For an example, create a new APL document in the authoring tool and select the Image Display Sample.
Display Characteristics
Echo Show and Fire TV Cube Echo SpotGuidelines for using BodyTemplate7:
{
"type": "BodyTemplate7",
"token": "SampleTemplate_3476",
"backButton": "VISIBLE",
"title": "Sample BodyTemplate7",
"backgroundImage": {
"contentDescription": "Textured grey background",
"sources": [
{
"url": "https://www.example.com/background-image1.png"
}
]
},
"image": {
"contentDescription": "Mount St. Helens landscape",
"sources": [
{
"url": "https://example.com/resources/card-images/mount-saint-helen-small.png"
}
]
}
}
Device display comparison–BodyTemplate7
Skills as displayed on Echo Show and Echo Spot
BodyTemplate7 on Echo Show with a full-width foreground image BodyTemplate7 on Echo Spot with a full-width foreground imageIf the foreground image is transparent, then the visual effect is different, as shown here.
BodyTemplate7 on Echo Show and Echo Spot with a full-width foreground transparent imageWireframe representations of BodyTemplate7
Fire TV Cube
Fire TV Cube Header TextEcho Show
Echo Show Header TextEcho Spot
Echo Spot Header Text ListTemplate1 for text lists and optional imagesTo use APL instead of this deprecated display template (recommended)
Create an APL document and use the AlexaTextList
responsive template to display a vertical scrolling list of text items. List items can include image thumbnails and multiple fields of information.
For details, see Replace display templates with responsive templates.
Display characteristics
Echo Show and Fire TV Cube Echo SpotGuidelines for using ListTemplate1:
{
"type": "ListTemplate1",
"token": "string",
"backButton": "VISIBLE"(default) | "HIDDEN",
"backgroundImage": "Image",
"title": "string",
"listItems": [
{
"token": "string",
"image": Image,
"textContent": TextContent
},
...
...
{
"token": "string",
"image": Image,
"textContent": TextContent
}
]
}
Device display comparison–ListTemplate1 ListTemplate2 for list images and optional text
To use APL instead of this deprecated display template (recommended)
Create an APL document and use the AlexaLists
responsive template with listImagePrimacy
set to true
to display image items in a horizontal list.
For details, see Replace display templates with responsive templates.
Display characteristics
Echo Show and Fire TV Cube Echo SpotGuidelines for using ListTemplate2:
{
"type": "ListTemplate2",
"token": "string",
"backButton": "VISIBLE"(default) | "HIDDEN",
"backgroundImage": "Image",
"title": "string",
"listItems": [
{
"token": "string",
"image": Image,
"textContent": TextContent
},
...
...
{
"token": "string",
"image": Image,
"textContent": TextContent
},
]
}
Device display comparison–ListTemplate2 Display template elements
This table lists all of the elements that can be found in a display template, although each template might use only a subset of these elements.
type
Name of the template BodyTemplate1
BodyTemplate2
BodyTemplate3
BodyTemplate6
BodyTemplate7
ListTemplate1
ListTemplate2
token
Used to track selectable elements in the skill service code. The value can be any user-defined string. Dog-List-2
1212323312
backButton
Used to place the back button on a display template. HIDDEN
VISIBLE
backgroundImage
Used to include a background image on a display template.
{
"contentDescription": "string",
"sources": [
{
"url": "string",
"size": "string",
"widthPixels": integer,
"heightPixels": integer
},
{
"url": "string",
"size": "string",
"widthPixels": integer,
"heightPixels": integer
},
{...}
]
}
title
Used for title for a display template. The value can be any user-defined string. "Doggie Carousel"
"Cake Recipes Galore"
textContent
Contains primaryText
, secondaryText
, and tertiaryText
.
{
"primaryText": ...,
"secondaryText": ...,
"tertiaryText": ...
}
primaryText
Contains type
(which is PlainText
or RichText
) and text
(which is a string). Limit of 8000 characters.
{
"text": "string",
"type": "PlainText" | "RichText"
}
secondaryText
Contains type
(which is PlainText
or RichText
) and text
(which is a string). Limit of 8000 characters.
{
"text": "string",
"type": "PlainText" | "RichText"
}
tertiaryText
Contains type
(which is PlainText
or RichText
) and text
(which is a string). Limit of 8000 characters.
{
"text": "string",
"type": "PlainText" | "RichText"
}
image
References and describes the image. Multiple sources for the image can be provided. The same format is used for both `backgroundImage` and `image`.
{
"contentDescription": "string",
"sources": [
{
"url": "string",
"size": "string",
"widthPixels": integer,
"heightPixels": integer
},
{
"url": "string",
"size": "string",
"widthPixels": integer,
"heightPixels": integer
},
{...}
]
}
listItems
Contains the text and images of the list items.
[
{
"token": "string",
"image": "Image",
"textContent": "TextContent"
},
...
...
{
"token": "string",
"image": "Image",
"textContent": "TextContent"
}
]
Other resources
For template-related information, see:
To build skills with screen display, see:
How to Build Alexa Skills for Alexa-Enabled Devices With a Screen for a quick start to creating an Alexa skill with screen support.
Best Practices for using Display Templates for design guidance.
Use Display Templates to Show Content on Screens for device display and behavior specifications.
Display Interface Reference for information about using the Display interface.
Last updated: Nov 28, 2023
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4