<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CarPlay",
  "identifier" : "/documentation/CarPlay/CPTextButton",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "CarPlay"
    ],
    "preciseIdentifier" : "c:objc(cs)CPTextButton"
  },
  "title" : "CPTextButton"
}
-->

# CPTextButton

A button that displays a stylized title.

```
class CPTextButton
```

## Overview

You use a text button to attach custom actions to an instance of [`CPPointOfInterest`](/documentation/CarPlay/CPPointOfInterest) or [`CPInformationTemplate`](/documentation/CarPlay/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:)`](/documentation/CarPlay/CPTextButton/init(title:textStyle:handler:))

Creates a button that displays a title in a specific style.

### Managing the Title

[`title`](/documentation/CarPlay/CPTextButton/title)

The text the button displays.

### Managing the Button Style

[`textStyle`](/documentation/CarPlay/CPTextButton/textStyle)

The text style the button applies to its title.

[`CPTextButtonStyle`](/documentation/CarPlay/CPTextButtonStyle)

The styles a button can apply to its title to communicate its action.



---

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)