list-item
This component serves as the child component whenever any list-related item has been called (as discussed in the jig.list and list sections. There is not much to add to this section that has not already been mentioned. The component focuses on the way in which the list items are returned, allowing the creator the ability to customize the data returned as well as add fun, beautiful UI elements to the lists.
Some properties are common to all components, see Common component properties for a list and their configuration options.
The core structure includes: title
Other options
subtitle, description - The subtitle or description that should be displayed together with the title on the list-item. You can format the text of these properties if you select the "Text With Format" option in the builder help (ctrl + space).
progress, color - This will add a colorful visualization (background color of your choice) of the progress of the actual list-item. It goes from left to right side and the range of the allowed values is from 0 - 1
divider - Space between two items in the list.
- none - Set by default
- transparent - This one will make 1pt "margin" between two items
- solid - This one displays a colored line
leftElement -The element to the left of the list
- Avatar
- Checkbox
- Icon
- Image
- Progress
rightElement - The element to the right of the list
- Amount Control
- Badge
- Button
- Checkbox
- Icon
- Switch
- Value
Actions:
onPress - The possibility to add any of the actions (please refer to the list of our Actions). This action(s) will be triggered as a reaction to the press event.
swipeable - This property will allow you to add the onPress action. This action will appear (and become pressable) by swiping the list-item to the left or right.
Simple List

datasources: cleaning-services-dynamic: type: datasource.sqlite options: provider: DATA_PROVIDER_DYNAMIC entities: - entity: default/cleaning-services query: | SELECT id, '$.id' as sqlid, '$.area', '$.description', '$.hourlyrate', '$.illustration', '$.image', '$.indoor', '$.onceoffrate', '$.service', '$.pressed', '$.time', '$.quantity' FROM [default/cleaning-services] WHERE '$.hourlyrate' IS NOT NULL ORDER BY id DESC
Simple list with Dividers

This example shows only a slight variation from the previous where this example has a solid divider properly configured. You also have the option to configure a transparent divider type too.
datasources: cleaning-services-dynamic: type: datasource.sqlite options: provider: DATA_PROVIDER_DYNAMIC entities: - entity: default/cleaning-services query: | SELECT id, '$.id' as sqlid, '$.area', '$.description', '$.hourlyrate', '$.illustration', '$.image', '$.indoor', '$.onceoffrate', '$.service', '$.pressed', '$.time', '$.quantity' FROM [default/cleaning-services] WHERE '$.hourlyrate' IS NOT NULL ORDER BY id DESC
List with colored Progress Bars

This example showcases two additional properties that have been configured, the progress bars and colors. Here we can see how we can use the data along with some expressions to manipulate data to create meaningful list displays.
datasources: cleaning-services-dynamic: type: datasource.sqlite options: provider: DATA_PROVIDER_DYNAMIC entities: - entity: default/cleaning-services query: | SELECT id, '$.id' as sqlid, '$.area', '$.description', '$.hourlyrate', '$.illustration', '$.image', '$.indoor', '$.onceoffrate', '$.service', '$.pressed', '$.time', '$.quantity' FROM [default/cleaning-services] WHERE '$.hourlyrate' IS NOT NULL ORDER BY id DESC
List with Charts

data: =@ctx.datasources.pie-chart-list-dynamic item: type: component.pie-chart options: chart: title: text: =@ctx.current.item.title verticalAlign: center subtitle: text: =@ctx.current.item.subtitle verticalAlign: center width: 100 height: 100 legend: isHidden: true series: - data: =@ctx.current.item.data layout: pie color: =@ctx.current.item.color

data: =@ctx.datasources.finance-charts # isHorizontal: true item: type: component.bar-chart options: yAxis: max: 2000 min: 200 xAxis: categories: =@ctx.datasources.finance-charts.x series: - data: =@ctx.datasources.finance-charts.y color: =@ctx.datasources.finance-charts.color
List with Avatars

This example is ideal for displaying a list of users associated with a single list item.
Examples: See the full example using static data in GitHub.
data: =@ctx.datasources.repair-services-static item: type: component.list-item options: title: =@ctx.current.item.service subtitle: =@ctx.current.item.description avatars: - uri: https://images.unsplash.com/photo-1591084728795-1149f32d9866?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=928&q=80 text: "" - uri: https://images.unsplash.com/photo-1573497019940-1c28c88b4f3e?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=774&q=80 text: "" - uri: https://images.unsplash.com/photo-1546961329-78bef0414d7c?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=774&q=80 text: "" - uri: https://images.unsplash.com/photo-1548449112-96a38a643324?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=774&q=80 text: ""
List with left Avatar

data: =@ctx.datasources.repair-services-static item: type: component.list-item options: title: =@ctx.current.item.service subtitle: =@ctx.current.item.description leftElement: element: avatar text: $substring($substringBefore(@ctx.current.item.service, " "), 1, 1) & $substring($substringAfter(@ctx.current.item.service, " ") , 1, 1) uri: =@ctx.current.item.illustration
List with left Checkboxes

This example showcases a list with checkboxes to the left. This can be done with preset values or can just be empty for the user to select themselves.
Examples: See the full example using static data in GitHub. See the e full example using dynamic data in GitHub.
Specifying initialValue will determine the value when the list is loaded, however, specifying the value presets the value itself. The latter is handy when you want to display details that don't require much intervention from the user or if you wish to make it easier and faster so they only have to review the current selections for instance.
data: =@ctx.datasources.repair-services-static item: type: component.list-item options: title: =@ctx.current.item.service subtitle: =@ctx.current.item.description leftElement: element: checkbox initialValue: =(@ctx.current.item.materials) = true ? true :false
List with the left Icons

data: =@ctx.datasources.cleaning-services-dynamic item: type: component.list-item options: title: =@ctx.current.item.service subtitle: =@ctx.current.item.time & 'minutes for task completion' leftElement: element: icon icon: =(@ctx.current.item.indoor) = "TRUE" ? 'home' :'car-garage'
List with the left Image

data: =@ctx.datasources.cleaning-services-dynamic item: type: component.list-item options: title: =@ctx.current.item.service subtitle: =@ctx.current.item.description leftElement: element: image text: =@ctx.current.item.service uri: =@ctx.current.item.image
List with left Progress

data: =@ctx.datasources.repair-services-static item: type: component.list-item options: title: =@ctx.current.item.service subtitle: =@ctx.current.item.description leftElement: element: progress title: Time value: =@ctx.current.item.time/120
Swipeable List (left)


This example demonstrates functionality that allows you to perform any of the action components with the context of the relevant list item in mind. We have demonstrated how you can set up a single primary action as well as setting up primary and secondary actions too.
Examples: See the full example using static data in GitHub. See the full example using dynamic data in GitHub.
Datasources: See the full datasource for static data in GitHub. See the full datasource for dynamic data in GitHub.
data: =@ctx.datasources.repair-services-static item: type: component.list-item options: title: =@ctx.current.item.service subtitle: =@ctx.current.item.description leftElement: element: icon icon: =(@ctx.current.item.materials = true ? 'home' :'car-garage') rightElement: element: value text: ='$ ' & $number(@ctx.current.item.hourlyRate) swipeable: left: - onPress: type: action.go-to options: linkTo: action-list-onPress label: Primary Action icon: alarm-bell color: primary # note that the secondary action is only for demo purposes, you can stop at the primary action - onPress: type: action.go-to options: linkTo: action-list-onPress label: Secondary Action icon: alert-triangle color: warning
List with the right Amount Control


Examples:
See the full example of amount control options in GitHub. See the full example using static data in GitHub. See the full example using dynamic data in GitHub.
Datasources: See the full datasource for static data in GitHub. See the full datasource for dynamic data in GitHub.
data: =@ctx.datasources.repair-services-static item: type: component.list-item options: title: =@ctx.current.item.service subtitle: =@ctx.current.item.description style: isDisabled: =@ctx.current.state.amount = 5 rightElement: element: amount-control value: 1 step: 1 minimum: 2 maximum: 5
List with the right Badges

data: =@ctx.datasources.repair-services-static item: type: component.list-item options: title: =@ctx.current.item.service subtitle: =@ctx.current.item.description rightElement: element: badge isHidden: =(@ctx.current.item.materials) = true ? true :false
List with right Buttons

data: =@ctx.datasources.repair-services-static item: type: component.list-item options: title: =@ctx.current.item.service subtitle: =@ctx.current.item.description rightElement: element: button title: Press Me onPress: type: action.go-back
List with the right Icons

data: =@ctx.datasources.repair-services-static item: type: component.list-item options: title: =@ctx.current.item.service subtitle: =@ctx.current.item.description rightElement: element: icon icon: =(@ctx.current.item.materials = true ? 'attachment' :'alert-triangle')
List with the right Switch

data: =@ctx.datasources.repair-services-static item: type: component.list-item options: title: =@ctx.current.item.service subtitle: =@ctx.current.item.description rightElement: element: switch initialValue: =(@ctx.current.item.materials = true ? true:false)
Swipeable list (right)


This example demonstrates functionality that allows you to perform any of the action components with the context of the relevant list item in mind. We have demonstrated how you can set up a single primary action as well as setting up primary and secondary actions too.
Examples:
See the full example using static data in GitHub. See the full example using dynamic data in GitHub.
Datasources: See the full datasource for static data in GitHub. See the full datasource for dynamic data in GitHub.
data: =@ctx.datasources.cleaning-services-dynamic item: type: component.list-item options: title: =@ctx.current.item.service subtitle: =@ctx.current.item.description leftElement: element: icon icon: =(@ctx.current.item.indoor = "TRUE" ? 'home' :'car-garage') rightElement: element: value text: =(@ctx.current.item.hourlyrate) != 'NA' ? '$ ' & $number(@ctx.current.item.hourlyrate) & ' p/hr':'$ ' & $number(@ctx.current.item.onceoffrate) & ' once off' swipeable: right: - onPress: type: action.go-to options: linkTo: action-list-onPress label: Primary Action icon: alarm-bell color: primary # note that the secondary action is only for demo purposes, you can stop at the primary action - onPress: type: action.go-to options: linkTo: action-list-onPress label: Secondary Action icon: alert-triangle color: warning
List with active Item
This allows the user to see when they are interacting with a specific list item. Whilst interacting, the list item changes slightly making it clear to the user that they are interacting with this item.


This allows the user to see when they are interacting with a specific list item. Whilst interacting, the list item changes slightly making it clear to the user that they are interacting with this item. Examples: See the full example using static data in GitHub. See the full example using dynamic data in GitHub. Datasources: See the full datasource for static data in GitHub. See the full datasource for dynamic data in GitHub.
children: - type: component.entity options: children: - type: component.entity-field options: label: Current User value: =@ctx.user.displayName - type: component.list options: data: =@ctx.datasources.repair-services-static hasActiveItem: true item: type: component.list-item options: title: =@ctx.current.item.service subtitle: =@ctx.current.item.time & ' mins' leftElement: element: image text: '' uri: =@ctx.current.item.image rightElement: element: value text: ='$ ' & @ctx.current.item.hourlyRate & ' p/hr' onPress: type: action.set-state options: state: =@ctx.solution.state.hasActiveItem value: true
List with Sections

children: - type: component.list options: sections: - title: Services incl Materials data: =@ctx.datasources.repair-services-static[materials=true] - title: Services excl Materials data: =@ctx.datasources.repair-services-static[materials=false] item: type: component.list-item options: title: =@ctx.current.item.service subtitle: =@ctx.current.item.description label: title: =@ctx.current.item.time & ' mins'
- Developer reference