---
title: TVTopShelfAction
framework: tvservices
role: symbol
role_heading: Class
path: tvservices/tvtopshelfaction
---

# TVTopShelfAction

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

## Declaration

```swift
class TVTopShelfAction
```

## Overview

Overview A 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 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 or displayAction property of your item.

## Topics

### Creating an Action Object

- [init(url:)](tvservices/tvtopshelfaction/init(url:)-2zqfn.md)

### Getting the URL

- [url](tvservices/tvtopshelfaction/url.md)

### Initializers

- [init(URL:)](tvservices/tvtopshelfaction/init(url:)-6nuwx.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Common types

- [TVTopShelfItem](tvservices/tvtopshelfitem.md)
- [TVTopShelfContent](tvservices/tvtopshelfcontent.md)
- [TVTopShelfObject](tvservices/tvtopshelfobject.md)
