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

# specialize

Implements queries used for data binding.

## Overview

The `specialize` element is used to modify an existing element based on a data query.
Combine the query with parameters contained in your JSON data to determine how to
modify an existing element. Here’s an example that changes the text for a button
if the user has started watching a media item, but hasn’t finished it.

```xml
<specialize state="({progress}-greater-than:0) and ({progress}-less-than:1)">
    <button tag="button">
        <text>Resume</text>
    </button>
</specialize>
```

### Subelements of specialize

The `specialize` element can contain any element.

### Elements that Use specialize

- [rules](/documentation/TVML/rules)

## 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)