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

# itemID

Mark elements for reuse during DOM updates.

## Overview

Use the `itemID` attribute to identify which elements are considered the same so
they can be reused during DOM updates. When recreating the DOM, TVMLKit makes any
necessary changes at the view level while retaining existing cells that have not
been modified.

### Values for itemID

- String: The identifier for the item. The identifier must be unique inside
  its parent DOM element. The identifier does not have to be unique inside of the document.

### Elements that Use itemID

- [productBundleTemplate](/documentation/TVML/productbundletemplate)
- [productTemplate](/documentation/TVML/producttemplate)
- [searchTemplate](/documentation/TVML/searchtemplate)
- [stackTemplate](/documentation/TVML/stacktemplate)

`itemID` can only be used with the following elements inside of the above templates:

- [grid](/documentation/TVML/grid)
- [section](/documentation/TVML/section) in the `grid` or `shelf` element
- [shelf](/documentation/TVML/shelf)
- Any element that can appear in a `shelf`/`section` or `grid`/`section` combination

---

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)