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

# button

Displays a button icon the user can click to initiate an action.

## Overview

Clicking a button or lockup is one of the most common ways for a user activate a
selection. Here’s an example of a button with the text inside of it.

```xml
<button>
    <text>Button</text>
</button
```

### Subelements of button

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

### Elements that Use button

- [alertTemplate](/documentation/TVML/alerttemplate)
- [banner](/documentation/TVML/banner)
- [descriptiveAlertTemplate](/documentation/TVML/descriptivealerttemplate)
- [footer](/documentation/TVML/footer)
- [row](/documentation/TVML/row)
- [separator](/documentation/TVML/separator)

## Topics

### Valid TVML Styles

[height](/documentation/TVML/element-shaping-height)

Specifies the height of an element.

[margin](/documentation/TVML/margin)

Specifies the spacing around an element.

[max-height](/documentation/TVML/element-shaping-max-height)

Specifies the maximum height for an element.

[max-width](/documentation/TVML/element-shaping-max-width)

Specifies the maximum width for an element.

[min-height](/documentation/TVML/element-shaping-min-height)

Specifies the minimum height for an element.

[min-width](/documentation/TVML/element-shaping-min-width)

Specifies the minimum width for an element.

[padding](/documentation/TVML/padding)

Specifies the padding between the border and contents of an element.

[width](/documentation/TVML/element-shaping-width)

Specifies how wide an element is.

### Valid TVML Attributes

[autoHighlight](/documentation/TVML/autohighlight)

Specifies that the element should initially be in focus.

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