Ti ringraziamo per la visita. Questa pagina è per il momento disponibile solo in inglese.

Text List Item

The Alexa text list item responsive component (AlexaTextListItem) displays text, formatted to display within a list.

Import the alexa-layouts package

To use AlexaTextListItem, import the alexa-layouts package.

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

AlexaTextListItem parameters

All parameters except type are optional.

Name Type Default Description Version added

hideDivider

Boolean

false

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

1.1.0

hideOrdinal

Boolean

false

When true, do not 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

Primary text to display for the list item.

1.1.0

theme

String

dark

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

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
  }
}