<!--
{
  "availability" : [
    "tvOS: 13.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "TVServices",
  "identifier" : "/documentation/TVServices/TVTopShelfItem",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "TV Services"
    ],
    "preciseIdentifier" : "c:objc(cs)TVTopShelfItem"
  },
  "title" : "TVTopShelfItem"
}
-->

# TVTopShelfItem

An item that uses an image to represent a movie, show, or other content in the top shelf.

```
class TVTopShelfItem
```

## Overview

A [`TVTopShelfItem`](/documentation/TVServices/TVTopShelfItem) object manages basic traits for all items, including the images they display and the actions they trigger. Typically, you create [`TVTopShelfCarouselItem`](/documentation/TVServices/TVTopShelfCarouselItem) or [`TVTopShelfSectionedItem`](/documentation/TVServices/TVTopShelfSectionedItem) objects for your interface. For inset interfaces, you can also create [`TVTopShelfItem`](/documentation/TVServices/TVTopShelfItem) objects directly.

After creating an item object, assign an image and one or more actions to it, and update any other relevant properties. Return the item object as part of the content for your interface.

Each unique item in your app must have a correspondingly unique identifier, and the identifier for each item must remain stable throughout the life of your app. Do not assign a different unique identifier for the same underlying item each time you create a [`TVTopShelfItem`](/documentation/TVServices/TVTopShelfItem) object for it.

## Topics

### Creating a Top Shelf Item

[`init(identifier: String)`](/documentation/TVServices/TVTopShelfItem/init(identifier:))

Creates a top shelf item with the specified identifier.

### Assigning Actions to the Item

[`var playAction: TVTopShelfAction?`](/documentation/TVServices/TVTopShelfItem/playAction)

The action to perform when the user wants to play the current item.

[`var displayAction: TVTopShelfAction?`](/documentation/TVServices/TVTopShelfItem/displayAction)

The action to perform when the user wants to see more information for the current item.

### Providing an Image for the Item

[`func imageURL(for: TVTopShelfItem.ImageTraits) -> URL?`](/documentation/TVServices/TVTopShelfItem/imageURL(for:))

Returns an image associated with the current item.

[`func setImageURL(URL?, for: TVTopShelfItem.ImageTraits)`](/documentation/TVServices/TVTopShelfItem/setImageURL(_:for:))

Associates an image with the current item.

[`struct ImageTraits`](/documentation/TVServices/TVTopShelfItem/ImageTraits)

Constants describing the image format.

### Getting the Item Attributes

[`var identifier: String`](/documentation/TVServices/TVTopShelfItem/identifier)

The unique identifier for the item.

[`var expirationDate: Date?`](/documentation/TVServices/TVTopShelfItem/expirationDate)

The date on which the item becomes unavailable.

## Relationships

### Inherits From

[`TVTopShelfObject`](/documentation/TVServices/TVTopShelfObject)

### Conforms To

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CVarArg`](/documentation/Swift/CVarArg)

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

### Inherited By

[`TVTopShelfCarouselItem`](/documentation/TVServices/TVTopShelfCarouselItem)

[`TVTopShelfSectionedItem`](/documentation/TVServices/TVTopShelfSectionedItem)

---

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)