Text List Item (1.1.0)
(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.7.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 |
---|---|---|---|---|
|
Boolean |
|
When |
1.1.0 |
|
Boolean |
|
When |
1.1.0 |
|
— |
The action to trigger when the user selects the list item. |
1.1.0 |
|
|
String |
— |
Primary text to display for the list item. |
1.1.0 |
|
String |
|
Set the dark or light color theme. The selected theme controls the colors used for the component. |
1.1.0 |
|
String |
— |
Always set to |
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
}
}
Related topics
Last updated: Nov 28, 2023