Documentation Archive

Developer

Apple TV Markup Language Reference

On This Page

Simple Display Elements

Simple display elements are single-line TVML elements used to display an image.

badge

The badge element contains a link to a small image that is displayed, often with another image. This element is commonly used to display images that provide additional information about the element in which they are contained. badge can be a subelement of:

Listing 27-1 shows an example of a badge element.

Listing 27-1badge example TVML
  1. <badge src="Path to image" alt="additional identifier" accessibility="" />

decorationImage

The decorationImage element contains a link to an image that is displayed. This element is commonly used to display images inside of other elements. decorationImage can be a subelement of:

Listing 27-2 shows the TVML format for a decorationImage element.

Listing 27-2decorationImage example TVML
  1. <decorationImage src="Path to image" />

fullscreenImg

The fullscreenImg element contains a link to an image that is to be displayed over an entire element.fullscreenImg can be a subelement of:

Listing 27-3 shows the TVML format for a fullscreenImg element.

Listing 27-3fullscreenImg example TVML
  1. <fullscreenImg src="Path to image here" />

heroImg

The heroImg element contains a link to an image that is to be displayed. This element is commonly used to display a picture of a product inside of a banner. heroImg can be a subelement of:

Listing 27-4 shows the TVML format for a heroImg element.

Listing 27-4heroImg example TVML
  1. <heroImg src="Path to image here" />

img

The img element contains a link to an image that is to be displayed. This element is commonly used to display a preview image for a product. img can be a subelement of:

Listing 27-5 shows the TVML format for an img element.

Listing 27-5img example TVML
  1. <img src="Path to image here" />

progressBar

The progressBar element creates an empty bar that is overlaid along the bottom of an image. A percentage of the bar is then filled based on the value assigned. This element is commonly used to denote how much of a media item has already been viewed. progressBar can be a subelement of:

Listing 27-6 shows an example for a progressBar element.

Listing 27-6progressBar example TVML
  1. <progressBar value="0.6" />

ratingBadge

The ratingBadge element contains a link to an image that is to be displayed. This element is commonly used to display a small image inside of a reviewCard element. ratingBadge can be a subelement of:

Listing 27-7 shows an example for a ratingBadge element.

Listing 27-7ratingBadge example TVML
  1. <ratingBadge value="0.7">
  2. </ratingBadge>

seasonBadge

The seasonBadge element contains a link to an image that is to be displayed. seasonBadge can be a subelement of:

Listing 27-8 shows an example for a seasonBadge element.

Listing 27-8seasonBadge example TVML
  1. <seasonBadge>7</seasonBadge>

textBadge

The textBadge element contains a link to an image that is to be displayed. textBadge can be a subelement of:

Listing 27-9 shows an example for a textBadge element.

Listing 27-9textBadge example TVML
  1. <textBadge>SDH</textBadge>