list
Overview
Version compatibility
list was introduced in version 4.29.0 of the JourneyApps Container.
It received several functional updates in version 4.84.0 of the JourneyApps Runtime.
The list UI component lists clickable items in a more visually prominent and customizable manner than pure text-based lists. list is a very versatile UI component and can be applied in many use cases, some common ones include:
A list of jobs, where each job is color-coded per its status
A set of photos taken, where the photo is displayed in thumbnail format on the item
A set of navigational links
A list of actions or workflow steps where each action could show a completed state
Basic Structure

list contains one or many list-item elements, which are either static (for basic usage) or dynamic (will repeat itself for each item in a query).
See the list-item documentation for further details:
Standard Attributes
label
labellabelAdvanced Attributes
align-label
align-labelalign-labelcontrols
controlsOptional
Type: none | bottom | top | both
Default: none
Version compatibility
controls was introduced in version 4.84.0 of the JourneyApps Runtime.
Controls allow a user to search a list and, if the list is paginated, to navigate to the next, previous or a specific page. Controls are hidden by default, but can be positioned at the bottom and/or top of a list.
Positioning
top
Positions controls at the top of the list
controls="top"
both
Positions controls at top AND bottom of the list
controls="both"
bottom
Positions controls at the bottom of the list
controls="bottom"
none
No controls
controls="none"
content-direction
content-directionVersion compatibility
content-direction was introduced in version 4.86.1 of the JourneyApps Runtime.
Optional
Type: left-to-right, right-to-left
Default: left-to-right
Specify the direction of the component’s content. Typically this mirrors all elements within the component.

label-case
label-caseVersion compatibility
label-case was introduced in version 4.86.1 of the JourneyApps Runtime.
label-color
label-colorVersion compatibility
label-color was introduced in version 4.86.1 of the JourneyApps Runtime.
limit
limitVersion compatibility
limit was introduced in version 4.84.0 of the JourneyApps Runtime.
Optional
Type: integer (minimum 2)
Default: none
The limit specifies the maximum number of list-items shown on a single page in a list. Once a limit is defined, the list becomes paginated and automatically computes how many pages there will be based on the total amount of items available from the query attribute.
Tip: When setting a limit ensure you also set the controls attribute. This will allow users to paginate and search as necessary.
empty-message
empty-messageVersion compatibility
empty-message was introduced in version 4.84.0 of the JourneyApps Runtime.
Optional
Type: string
Default: unset
Text that is displayed inside the list when it is empty.
icon-position
icon-positionVersion compatibility
icon-position was introduced in version 4.86.1 of the JourneyApps Runtime.
Note
icon-position specifies the icon position for all list-items in the list, whether the icon was defined per its shorthand version or longhand version.
id
ididshow-if and hide-if
show-ifhide-ifshow-if and hide-ifshow-pagination
show-paginationVersion compatibility
show-pagination was introduced in version 4.89.0 of the JourneyApps Runtime.
Optional
Type: boolean
Default: true
In a paginated list, and when controls are shown, the show-pagination attribute can be used to show or hide the pagination controls. This may be useful for lists that only have a single page.
show-search
show-searchVersion compatibility
show-search was introduced in version 4.89.0 of the JourneyApps Runtime.
Optional
Type: boolean
Default: true
When controls are shown, the show-search attribute can be used to show or hide the search box independent of the pagination controls.
Component Methods
The following component methods are available when an id is assigned to the component and component.list({id:'my-id'}) is called from JS/TS:
clearSearch
clearSearchProgrammatically clears the search value from the search box.
nextPage
nextPageProgrammatically select the next page in a paginated list.
previousPage
previousPageProgrammatically select the previous page in a paginated list.
scrollIntoView
scrollIntoViewProgrammatically scroll until the list is visible in the view.
selectItem
selectItemSelect a list-item from the list by its header text. This will trigger the list-item's on-press event.
selectItemByIndex
selectItemByIndexSelect a list-item from the list by its index. This will trigger the list-item's on-press event. Note: Indexes begin at 1.
selectPage
selectPageProgrammatically select the a page in a paginated list by its page number.
setSearch
setSearchProgrammatically enter a search value and triggers a search of the list.
Last updated