Skip to main content

ListItem

The item template of a List. It renders no structure of its own; it only repeats its inner root element once per item.

Signature

Rules

Scope

Inside ListItem:
  • {Item.*}: the current array item
  • {Index}: the current index, 0-based
The variable name comes from the parent List.As:

Runtime behavior

  • List repeats the ListItem root element once per array entry.
  • Each instance has its own Item/Index scope.
  • There is no selection state, divider, or click event; put a Button/Link inside the item, or add a Divider.
  • Data inside the item template still belongs to the component’s global scope; it is not a per-item data source.

Example

Gotchas

  • Bare text cannot go directly inside ListItem; use Text.Value or the content syntax of Text.
  • OnClick on a Button inside an item can bind values from the current item, such as {Item.Url}.