list-item
Overview
list contains one or many list-item elements.

A list-item can be defined as either static (for basic usage) or dynamically (will repeat itself for each item in a query). A simple static list will be defined as:
While a dynamic list will be defined as:
You can also mix dynamic and static list items together such as:
list-item syntax
list-item syntaxlist-item attributes can be represented as either shorthand (perfect for quick and common use cases) or longhand (for more complicated use cases). In shorthand mode, you can simply add attributes such as content="test" on a list-item while in longhand mode you would nest a <content>test</content> tag inside the list-item.
The following attributes on a list-item support the shorthand notation:
Example: Shorthand attributes
Example: Longhand attributes
Example: Shorthand and longhand combined
Standard Attributes
bind
bindOptional
Type: Same type as query
Default: unset
Shorthand supported? false
The presence of bind makes the list selectable. bind contains the variable that stores the object that the user selected. Must be the same data model type as the list-item's query.
Note: A list-item's action's on-press has no effect if the bind attribute is set.
content
contentOptional
Type: string (static text, a format string or the return value of a JS/TS function)
Default: unset
Shorthand supported? true
Text that is displayed in the content position of the list-item.
Example: Shorthand syntax
Example: Longhand syntax
footer
footerOptional
Type: string (static text, a format string or the return value of a JS/TS function)
Default: unset
Shorthand supported? true
Text that is displayed in the footer position of the list-item.
Example: Shorthand syntax
Example: Longhand syntax
header
headerOptional
Type: string (static text, a format string or the return value of a JS/TS function)
Default: unset
Shorthand supported? true
Text that is displayed in the header position of the list-item.
Example: Shorthand syntax
Example: Longhand syntax
query
queryOptional
Default: unset
Shorthand supported? false
The presence of query makes list-items dynamic. query contains the name of the query or array variable to populate the objects shown as list-items.
Advanced Attributes
icon
iconA shorthand attribute. See asset > icon
image
imageA shorthand attribute. See asset > src
on-press
on-pressA shorthand attribute. See action > on-press
on-press-icon
on-press-iconA shorthand attribute. See action > icon
show-if and hide-if
show-ifhide-ifshow-if and hide-ifLast updated
