Thank you for your visit. This page is only available in English at this time.

Headline

The Alexa headline template (AlexaHeadline) displays short, informational text string on the screen. This is a full-screen template that can include a header, footer, and background.

Import the alexa-layouts package

To use AlexaHeadline, import the alexa-layouts package.

The latest version of the alexa-layouts package is 1.1.0. AlexaHeadline was introduced in version 1.1.0.

AlexaHeadline parameters

All parameters except type are optional.

Name Type Default Description Version added

backgroundAlign

String

center

Image/video alignment to apply to background image/video. Defaults to center.

1.1.0

backgroundBlur

Boolean

false

When true, the provided background image is blurred. Applies only when backgroundImageSource is set. Defaults to false.

1.1.0

backgroundColorOverlay

Boolean

false

When true, a scrim is applied to the background. With images and videos, this can make it easier to read the text displayed over the item. Defaults to false.

1.1.0

backgroundColor

Color

None

Color to use as background color. Used when neither backgroundImageSource or backgroundVideoSource are provided.

1.1.0

backgroundImageSource

String

None

URL for the background image source. Used when backgroundVideoSource is not provided.

1.1.0

backgroundOverlayGradient

Boolean

false

When true, a gradient is applied to the background.

1.1.0

backgroundScale

String

best-fill

Image or video scaling to apply to background image or video. Defaults to best-fill.

1.1.0

backgroundVideoAudioTrack

String

foreground

Audio track to play on when playing the video. Can be foreground | background | none Defaults to foreground.

1.1.0

backgroundVideoAutoPlay

Boolean

false

When true, the video automatically begins playing when the document is rendered on the device. Applies when backgroundVideoSource is set. Defaults to false.

1.1.0

backgroundVideoSource

Video source

None

The background video source. Provide a source in the same format shown for the source property of the Video component

1.1.0

footerHintText

String

None

Hint text to display in the footer. Use textToHint to add the correct wake word to the hint.

1.0.0

headerAttributionImage

String

None

URL for attribution image source. Only shown when headerAttributionPrimacy is true, or on a device that shows Title/Subtitle and Attribution.

1.0.0

headerAttributionPrimacy

Boolean

true

On devices that can only display one element due to screen size, Attribution is prioritized. Setting to false displays Title/Subtitle. Defaults to true.

1.0.0

headerAttributionText

String

None

Attribution text to render in the header. The headerAttributionText value is shown only when no headerAttributionImage is provided and when headerAttributionPrimacy is true, or on a device that shows both Title/Subtitle and Attribution.

1.0.0

headerBackButtonAccessibilityLabel

String

None

An accessibility label to describe the back button to customers who use a screen reader.

1.1.0

headerBackButtonCommand

Command

{"type":"SendEvent","arguments":["goBack"]}

Command to execute when the user selects the back button. Defaults to SendEvent with a 'GoBack' argument.

1.1.0

headerBackButton

Boolean

false

Toggle to display back button in header. Defaults to false.

1.0.0

headerBackgroundColor

String

transparent

Optional color value to use as the background color for the Header. Defaults to transparent.

1.0.0

headerDivider

Boolean

false

Toggle to display the divider that appears at the bottom of header to help separate it from the content below. Default to false

1.1.0

headerSubtitle

String

None

Secondary text to render in header.

1.0.0

headerTitle

String

None

Primary text to render in header.

1.0.0

primaryText

String

Primary text to display in up to two lines. Text is truncated to fit to two lines.

1.1.0

secondaryText

String

Secondary text to display in a single line. Displayed below the primary text. Text is truncated to display on a single line.

1.1.0

theme

String

dark

Colors will be switched depending on the specified theme (light/dark). Default to dark theme

1.1.0

type

String

None

Always set to AlexaHeadline

1.1.0

AlexaHeadline example

Copied to clipboard.

{
  "type": "AlexaHeadline",
  "primaryText": "This is the main headline text. It is limited to just two lines, so if it is long, the text is truncated.",
  "secondaryText": "This is the secondary text. It is limited to a single line. So very long secondary text is truncated",
  "backgroundColor": "red",
  "footerHintText": "I am the hint",
  "headerAttributionImage": "https://d2o906d8ln7ui1.cloudfront.net/images/cheeseskillicon.png",
  "headerAttributionPrimacy": true,
  "headerAttributionText": "Attribution",
  "headerBackButton": true,
  "headerBackButtonAccessibilityLabel": "back",
  "headerBackgroundColor": "transparent",
  "headerDivider": true,
  "headerSubtitle": "Header subtitle",
  "headerTitle": "Header title",
  "theme": "dark"
}