---
title: CPTextButton
framework: carplay
role: symbol
role_heading: Class
path: carplay/cptextbutton
---

# CPTextButton

A button that displays a stylized title.

## Declaration

```swift
class CPTextButton
```

## Overview

Overview You use a text button to attach custom actions to an instance of CPPointOfInterest or CPInformationTemplate. When creating a button, you provide a closure that CarPlay invokes when the user taps the button. You communicate the button’s purpose using a title and a text style that the button applies to the title.

## Topics

### Creating a Text Button

- [init(title:textStyle:handler:)](carplay/cptextbutton/init(title:textstyle:handler:).md)

### Managing the Title

- [title](carplay/cptextbutton/title.md)

### Managing the Button Style

- [textStyle](carplay/cptextbutton/textstyle.md)
- [CPTextButtonStyle](carplay/cptextbuttonstyle.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

### Location and Information

- [CPPointOfInterestTemplate](carplay/cppointofinteresttemplate.md)
- [CPInformationTemplate](carplay/cpinformationtemplate.md)
- [Integrating CarPlay with your quick-ordering app](carplay/integrating-carplay-with-your-quick-ordering-app.md)
