<!--
{
  "documentType" : "article",
  "framework" : "TVML",
  "identifier" : "/documentation/TVML/prototypes",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "prototypes"
}
-->

# prototypes

Defines a group of elements that can be reused through binding.

## Overview

The `prototypes` element is used to bind data item types, simplifying the template
layout. A single binding definition provides the ability to display any number of
data items. For more information on data binding, see [TVML Programming Guide](https://developer.apple.com/library/content/documentation/TVMLKitJS/Conceptual/TVMLProgrammingGuide/GeneratingContentForYourApp.html#//apple_ref/doc/uid/TP40016718-CH4-SW1).
Here’s an example that uses the `prototypes` element to display an undefined number
of `lockup` elements.

```xml
<prototypes>
    <lockup prototype="artwork">
        <img binding="@src:{url};" width="200" height="300"/>
        <title binding="textContent:{title};" />
    </lockup>
</prototypes>
<section binding="items:{images};" />
```

### Subelements of prototypes

`prototypes` can contain any element that can be contained by a `section` element.
The child elements must implement the `prototype` attribute to bind the correct data
items.

### Elements that Use prototypes

`The prototypes` element can be a used by any element.

## Topics

### Valid TVML Attributes

[binding](/documentation/TVML/binding)

Associates information in a data item with an element.

[prototype](/documentation/TVML/prototype)

Associates a data item type with an element.

[theme](/documentation/TVML/theme)

Sets the color scheme for an element.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)