Repeater
The Repeater block iterates over an array from the replacements context and renders its template elements once per item. It supports scoped variable injection, separators, empty states, and horizontal/vertical layouts.Properties
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
type | "repeater" | yes | — | Block type identifier |
data_source | string | yes | — | Key in replacements that resolves to an array |
item_variable | string | no | "item" | Variable name for the current item in templates |
index_variable | string | no | "index" | Variable name for the current iteration index (0-based) |
elements | BlockElement[] | yes | — | Template blocks repeated for each item |
separator | "divider" | "space" | "none" | no | "none" | Visual separator between iterations |
empty_state | BlockElement | BlockElement[] | no | — | Block(s) to render when the array is empty or missing |
max_items | number | no | — | Maximum number of items to render |
direction | "vertical" | "horizontal" | no | "vertical" | Stack direction for repeated items |
Basic Usage
- Jason / jason@example.com — Admin
- Sarah / sarah@example.com — Editor
Scoped Variables
Each iteration creates a scoped replacements context:{item.property}— Access properties of the current array item (or use a custom variable name viaitem_variable){index}— The 0-based iteration index (or use a custom name viaindex_variable)- Parent replacements — All parent-level replacements remain accessible (e.g.,
{company_name})
{item} resolves to the value directly.
With Separator and Empty State
Horizontal Layout
Nested Repeaters
Repeaters can be nested for multi-level data:Builder Integration
In the WYSIWYG builder:- Drag Repeater from the Layout category in the block library
- Configure the Data Source key in the properties panel
- Toggle between Template and Empty State views using the header buttons
- Add blocks to the template — they will be repeated for each array item
- Use the Replacements panel to provide preview data, then switch to Preview mode
Nesting Rules
A repeater can appear in:- Root level
- Section
- Wizard Step
- Column
- Another Repeater
- Heading, Text, Alert, Lists, Column Layout, Section, Actions, Form, Button, Block Replacement, nested Repeater
