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

# Arrays

> Arrays let you add repeatable content blocks to transactional emails, populated at send time via data variables.

Arrays are a way to add repeatable sections to an email allowing you to add a dynamic list of items, like products.

You can display up to 100 items in each array block.

<Info>
  Arrays are currently supported in transactional emails.
</Info>

## Adding arrays

You can add array blocks to your email by using the button in the editor toolbar or typing `/` and selecting **Array**.

<img src="https://mintcdn.com/loops/QNkh2P3cmoyoSmv7/images/array-button.png?fit=max&auto=format&n=QNkh2P3cmoyoSmv7&q=85&s=56794615ab6bc3bdcb05a4cd8cbd721b" alt="Add an array" width="2280" height="990" data-path="images/array-button.png" />

Arrays are assigned a data variable name (default is `items`) which can be changed in the editor panel in the **Array** section.

<img src="https://mintcdn.com/loops/QNkh2P3cmoyoSmv7/images/array-sidebar.png?fit=max&auto=format&n=QNkh2P3cmoyoSmv7&q=85&s=1fa61002fd1dc6bd4bca37a844d82806" alt="Editor panel with array section" width="2280" height="1467" data-path="images/array-sidebar.png" />

## Adding content to arrays

Once the array block is in your email, you can add content inside, which will be repeated for each item in the array.

For example, if you have an array of products and you want to show a name and a description for each product, you can add a heading and a text block inside the array block.

<img src="https://mintcdn.com/loops/QNkh2P3cmoyoSmv7/images/array-content.png?fit=max&auto=format&n=QNkh2P3cmoyoSmv7&q=85&s=3410f0ba428c42c771f0a1fca78bad51" alt="Array block with example product inside" width="2280" height="990" data-path="images/array-content.png" />

## Adding dynamic content

You can add dynamic content to array blocks by inserting [data variables](/transactional#add-data-variables). These data variables can then be populated with data when you [send your email](/transactional#send-your-email).

You can add data variables by using the button above the editor, typing `{`, or typing `/` and selecting **Data variable**.

<img src="https://mintcdn.com/loops/QNkh2P3cmoyoSmv7/images/array-variables.png?fit=max&auto=format&n=QNkh2P3cmoyoSmv7&q=85&s=f1c2c66db8f234114658f25305d9dbc6" alt="Add a data variable" width="2280" height="990" data-path="images/array-variables.png" />

By default, data variables you add will be available within the array block only. You can change variable tags inside array blocks to be "global" by changing the **Array item** option in the right sidebar to **No**.

<img src="https://mintcdn.com/loops/QNkh2P3cmoyoSmv7/images/array-global-variable.png?fit=max&auto=format&n=QNkh2P3cmoyoSmv7&q=85&s=6c39c84b3e639faddf392df15a111ce7" alt="Global toggle" width="2280" height="1467" data-path="images/array-global-variable.png" />

## Previewing arrays

You can preview how multiple items will look in your email by using the `+` and `-` buttons in the **Preview** section of the editor sidebar. These buttons allow you to see how the array will look in your email with different numbers of items.

<img src="https://mintcdn.com/loops/QNkh2P3cmoyoSmv7/images/array-preview.png?fit=max&auto=format&n=QNkh2P3cmoyoSmv7&q=85&s=d88a39c4599359e31402c96a841b11a6" alt="Preview items" width="2280" height="1308" data-path="images/array-preview.png" />
