Text List Item
The Alexa text list item responsive component (AlexaTextListItem
) displays text, formatted to display within a list.
- Import the alexa-layouts package
- AlexaTextListItem parameters
- AlexaTextListItem example
- Related topics
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 |
---|---|---|---|---|
|
Boolean |
false |
When |
1.1.0 |
|
Boolean |
false |
When true, do not display a number next to the list time. |
1.1.0 |
|
none |
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 |
dark |
Colors will be switched depending on the specified theme (light/dark). |
1.1.0 |
|
String |
None |
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
}
}