Header

The Alexa header responsive component (AlexaHeader) displays common header information such as a title, subtitle, and back button.

Import the alexa-layouts package

To use AlexaHeader, import the alexa-layouts package.

The latest version of the alexa-layouts package is 1.2.0. AlexaHeader was introduced in version 1.0.0.

Use the Other Versions option at the top of this page to see documentation for different versions of AlexaHeader. The table of parameters notes the version of alexa-layouts in which each parameter was added.

AlexaHeader parameters

All parameters except type are optional.

Name Type Default Description Version added/updated

headerAttributionImage

String

None

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

1.0.0

headerAttributionPrimacy

Boolean

true

When true, display the headerAttributionImage on devices that display a single element due to screen size. When false, display the headerTitle and headerSubtitle.

1.0.0

headerAttributionText

String

None

Attribution text to render in the header. Shown when headerAttributionImage doesn't have a value and headerAttributionPrimacy is true, or on a device that shows both Title/Subtitle and Attribution.

1.0.0

headerBackButton

Boolean

false

When true, display a back button in the header.

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.

1.1.0

headerBackgroundColor

String

transparent

Optional color value to use as the background color for the header.

1.0.0

headerDivider

Boolean

false

When true, display a divider below the header to help separate it from content.

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

theme

String

dark

Set the dark or light color theme. The selected theme controls the colors used for the component.

1.1.0

type

String

None

Always set to AlexaHeader

1.0.0

AlexaHeader example

{
  "type": "AlexaHeader",
  "headerBackButton": true,
  "headerBackButtonAccessibilityLabel": "back",
  "headerBackgroundColor": "red",
  "headerTitle": "Header title",
  "headerSubtitle": "Header subtitle",
  "headerAttributionText": "Attribution",
  "headerAttributionImage": "https://d2o906d8ln7ui1.cloudfront.net/images/cheeseskillicon.png",
  "headerAttributionPrimacy": true,
  "headerDivider": true
}