Text List Item

(This is not the most recent version of AlexaTextListItem. Use the Other Versions option to see the documentation for the most recent version of AlexaTextListItem)

The Alexa text list item responsive component (AlexaTextListItem) displays text, formatted to display within a list. The AlexaTextList template uses AlexaTextItem to define the list items.

Import the alexa-layouts package

To use AlexaTextListItem, import the alexa-layouts package.

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

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

AlexaTextListItem parameters

All parameters except type are optional.

Name Type Default Description Version added/updated

hideDivider

Boolean

false

When true, hide the horizontal divider displayed below the list item.

1.1.0

hideOrdinal

Boolean

false

When true, don't display a number next to the list time.

1.1.0

primaryAction

Command

None

The action to trigger when the user selects the list item.

1.1.0

primaryText

String

None

Primary text to display for the list item.

1.1.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 AlexaTextListItem

1.1.0

AlexaTextListItem example

This example passes an AlexaTextListItem to a Sequence to display a list of items.

{
  "type": "Sequence",
  "id": "textList",
  "numbered": true,
  "height": "100vh",
  "data": [
    {
      "primaryText": "The first list item."
    },
    {
      "primaryText": "The second list item"
    },
    {
      "primaryText": "The third list item."
    }
  ],
  "item": {
    "type": "AlexaTextListItem",
    "primaryText": "${data.primaryText}",
    "hideOrdinal": false,
    "hideDivider": false
  }
}