> ## Documentation Index
> Fetch the complete documentation index at: https://docs.heylua.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List-Item Component

> Display structured lists of products, rooms, menu items, or articles

## Overview

The **List-Item** component displays structured information in a visually appealing format across all channels.

<Card title="Perfect for:" icon="list">
  Products, hotel rooms, menu items, articles, search results - any list of options
</Card>

## Format

```
::: list-item
![image](Image-URL)
# Item Title
Brief summary of the item (price, availability, key details — max ~40 words).
:::
```

<Note>
  The title must be a `# ` line (hash **followed by a space**). There is no separate subheading — put the price, stock, or other key details at the start of the description.
</Note>

## Requirements

<CardGroup cols={2}>
  <Card title="Unique Titles" icon="fingerprint">
    Each item must have a unique title
  </Card>

  <Card title="10 Item Max" icon="hashtag">
    Maximum 10 items per response
  </Card>

  <Card title="Images Optional" icon="image">
    Include when available
  </Card>

  <Card title="Concise" icon="text">
    \~40 words max per summary
  </Card>
</CardGroup>

## Complete Examples

### E-commerce Product

```
::: list-item
![image](https://cdn.example.com/laptop-pro.jpg)
# UltraBook Pro Laptop
$1,299.00 · In Stock. Professional-grade laptop with 16GB RAM, 512GB SSD, and a stunning 14" Retina display. Perfect for developers and content creators. Free 2-day shipping.
:::
```

<Frame>
  <img src="https://mintcdn.com/luaglobal/5airD3u2P6mv3Ovl/images/formatting/formatted-response-example.png?fit=max&auto=format&n=5airD3u2P6mv3Ovl&q=85&s=9500b90fb1ad67a7353b50222c092625" alt="List-items rendered in the Lua Pop web widget" width="1928" height="1344" data-path="images/formatting/formatted-response-example.png" />
</Frame>

*List-items rendered in the Lua Pop web widget.*

### Hotel Room

```
::: list-item
![image](https://hotel.example.com/deluxe-ocean.jpg)
# Deluxe Ocean View Suite
$250/night · 3 rooms available. Spacious suite with king bed, private ocean-facing balcony, and modern amenities. Includes complimentary breakfast, WiFi, and parking. Maximum 2 guests.
:::
```

### Restaurant Menu Item

```
::: list-item
![image](https://restaurant.example.com/pasta-special.jpg)
# Chef's Seafood Linguine
$24.99 · Available tonight. Handmade linguine with fresh seafood, cherry tomatoes, and basil in a white wine sauce. Served with garlic bread. Gluten-free option on request.
:::
```

## How to Configure

### In Persona

```yaml theme={null}
persona: |
  When showing products, ALWAYS use list-item format:
  
  ::: list-item
  ![image](product-image-url)
  # Product Name
  $Price · Stock status. Product description here.
  :::
  
  Format each product individually. Maximum 10 products per response.
```

### In Skill Context

```typescript theme={null}
const ecommerceSkill = new LuaSkill({
  context: `
    When search_products returns results, format each as:
    
    ::: list-item
    ![image](product.imageUrl)
    # product.name
    $product.price · product.stockStatus. product.description
    :::
    
    Always include image if available.
  `
});
```

## Best Practices

<AccordionGroup>
  <Accordion title="✅ Make Titles Unique">
    ```
    ✅ Good:
    # Deluxe Ocean View
    # Standard Garden View

    ❌ Bad:
    # Room Option
    # Room Option
    ```
  </Accordion>

  <Accordion title="✅ Lead the Description with Key Info">
    There's no subheading — open the description with price, availability, or other key details.

    ```
    ✅ Good:
    # Deluxe Ocean View
    $250/night · Available. King bed, private balcony.

    ❌ Bad:
    # Deluxe Ocean View
    A room.
    ```
  </Accordion>

  <Accordion title="✅ Keep Descriptions Concise">
    ```
    ✅ Good: ~40 words with key features
    ❌ Bad: 200 word essay
    ```
  </Accordion>

  <Accordion title="✅ Use Quality Images">
    * High resolution
    * Direct image URLs
    * Web-accessible (HTTPS)
    * Representative of item
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Actions Component" icon="hand-pointer" href="/formatting/actions">
    Add interactive buttons after lists
  </Card>

  <Card title="Configure Persona" icon="user" href="/cli/persona-command">
    Add formatting instructions
  </Card>
</CardGroup>
