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

# loadingTemplate

Displays a spinner and description on the screen.

## Overview

Use the `loadingTemplate` element to display a spinner and description of why the
spinner is being displayed; for example, an interim page showing that the requested
page is being loaded. A spinner is automatically presented when the page is displayed,
and you can add text to tell your users what is happening. The following figure shows
the basic layout for a `layoutTemplate` page. The theme for the loading template
defaults to the system preference.

> Note: When a user performs an action to bring up a new page and the new page is
> not immediately ready, a `loadingTemplate` page should be presented. After the new
> page is ready, replace the `loadingTemplate` with the new page onto the navigation
> stack.

![Layout diagram showing a title area and a spinner.](images/com.apple.TVML/loadingtemplate-1.png)

### Main Elements

The following listing shows main elements of the `loadingTemplate` in TVML format.

```xml
<document>
   <loadingTemplate>
      <activityIndicator>
         <title>Title</title>
      </activityIndicator>
   </loadingTemplate>
</document>
```

#### Element Descriptions

- [activityIndicator](/documentation/TVML/activityindicator): Image of a spinning wheel icon.
- [title](/documentation/TVML/title): The text telling the user why there is a delay.

### Example

The following listing shows the TVML for a loadingTemplate example.

```xml
<document>
   <loadingTemplate>
      <activityIndicator>
         <title>Loading requested page</title>
      </activityIndicator>
   </loadingTemplate>
</document>
```

The following figure shows the output of the above example:

![Screenshot of a loading page with a spinner icon.](images/com.apple.TVML/loadingtemplate-2.png)

## Topics

### Valid TVML Attributes

[binding](/documentation/TVML/binding)

Associates information in a data item with an element.

[layoutDirection](/documentation/TVML/layoutdirection)

Specifies the direction in which text is displayed.

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