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

# TVTopShelfAction

An action to perform in response to user interactions with an item in the top shelf.

```
class TVTopShelfAction
```

## Overview

A [`TVTopShelfAction`](/documentation/TVServices/TVTopShelfAction) object contains the URL that you want tvOS to open when the user selects an item in the top shelf. Use actions to specify the location of playable content or pages containing additional information.

When configuring a [`TVTopShelfItem`](/documentation/TVServices/TVTopShelfItem) to display in a carousel interface, the system chooses a title and image for each button on the item based on whether you assigned the action object to the [`playAction`](/documentation/TVServices/TVTopShelfItem/playAction) or [`displayAction`](/documentation/TVServices/TVTopShelfItem/displayAction) property of your item.

## Topics

### Creating an Action Object

[`init(url: URL)`](/documentation/TVServices/TVTopShelfAction/init(url:)-2zqfn)

Creates a new action object that displays the content at the specified URL.

### Getting the URL

[`var url: URL`](/documentation/TVServices/TVTopShelfAction/url)

The URL of the content you want to display.

### Initializers

[`init(URL: URL)`](/documentation/TVServices/TVTopShelfAction/init(URL:)-6nuwx)

## Relationships

### Conforms To

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

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

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

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

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

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

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)