---
id: fast-element.repeat
title: repeat() function
hide_title: true
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[@microsoft/fast-element](./fast-element.md) &gt; [repeat](./fast-element.repeat.md)

## repeat() function

A directive that enables list rendering.

<b>Signature:</b>

```typescript
export declare function repeat<TSource = any, TItem = any>(itemsBinding: Binding<TSource, readonly TItem[]>, templateOrTemplateBinding: SyntheticViewTemplate | Binding<TSource, SyntheticViewTemplate>, options?: RepeatOptions): CaptureType<TSource>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  itemsBinding | [Binding](./fast-element.binding.md)<!-- -->&lt;TSource, readonly TItem\[\]&gt; | The array to render. |
|  templateOrTemplateBinding | [SyntheticViewTemplate](./fast-element.syntheticviewtemplate.md) \| [Binding](./fast-element.binding.md)<!-- -->&lt;TSource, [SyntheticViewTemplate](./fast-element.syntheticviewtemplate.md)<!-- -->&gt; | The template or a template binding used obtain a template to render for each item in the array. |
|  options | [RepeatOptions](./fast-element.repeatoptions.md) | Options used to turn on special repeat features. |

<b>Returns:</b>

[CaptureType](./fast-element.capturetype.md)<!-- -->&lt;TSource&gt;
