List Item

tile/listItem

Adds a single row inside a list. Use these child components: tile/text, tile/link, or tile/icon.

Properties 

This component has no configurable properties. Provide content through child components.

Usage 

Use a list item for a single row inside a tile/list. It carries the row’s content with text, links, and icons while the parent list owns the spacing and markers. A list item has no attributes of its own. It shows content provided by its children.

Put the list item inside a tile/list. Markers and density come from the parent list, not the item.

Note

1{
2    "definition": "tile/list",
3    "children": [
4        {
5            "definition": "tile/listItem",
6            "children": [
7                {
8                    "definition": "tile/text",
9                    "attributes": { "text": "Item content" }
10                }
11            ]
12        }
13    ]
14}

A list item can hold several children to combine an icon, text, and a link in one row.

1{
2    "definition": "tile/listItem",
3    "children": [
4        {
5            "definition": "tile/icon",
6            "attributes": { "name": "info", "size": "sm" }
7        },
8        {
9            "definition": "tile/text",
10            "attributes": { "text": "See the documentation for details: " }
11        },
12        {
13            "definition": "tile/link",
14            "attributes": { "text": "Read more", "href": "https://example.com" }
15        }
16    ]
17}

Design Guidelines 

Consider these guidelines when working with list items.

  • Compose each row from tile/text, tile/link, and tile/icon children rather than putting content directly on the item.
  • To make a whole row clickable, attach an action to the item rather than wrapping its contents in a separate control.

Limitations 

Note any limitations that apply to this component.

Slackbot 

No known limitations for tile/listItem in Slackbot.

ChatGPT 

No known limitations for tile/listItem in ChatGPT.

Agentforce 

No known limitations for tile/listItem in Agentforce.

See Also 

Beta Feature

Headless Experience Layer is a pilot or beta service that is subject to the Beta Services Terms at Ageements - Salesforce.com or a written Unified Pilot Agreement if executed by Customer, and applicable terms in the Product Terms Directory. Use of this pilot or beta service is at the Customer's sole discretion.

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!