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

# CPPanelButtonConfiguration

A type that provides the common behaviors for a button layout in a panel.

```
class CPPanelButtonConfiguration
```

## Overview

The `CPPanelButtonConfiguration` type defines the default behaviors for button configurations in a panel. You don’t
create this type directly or use it to configure your panel. Instead, instantiate one of the defined subclasses based on the type
of panel you’re configuring. For example, create a [`CPMapPanelButtonConfiguration`](/documentation/CarPlay/CPMapPanelButtonConfiguration) object when configuring
content for a [`CPMapPanel`](/documentation/CarPlay/CPMapPanel) type.

## Topics

### Initializers

[`init?(coder: NSCoder)`](/documentation/CarPlay/CPPanelButtonConfiguration/init(coder:))

[`init(primaryAction: CPTextButton, secondaryAction: CPTextButton?)`](/documentation/CarPlay/CPPanelButtonConfiguration/init(primaryAction:secondaryAction:))

Initializes the button configuration object with the specified buttons.

### Instance Properties

[`var primaryAction: CPTextButton`](/documentation/CarPlay/CPPanelButtonConfiguration/primaryAction)

The primary action button for the panel.

[`var secondaryAction: CPTextButton?`](/documentation/CarPlay/CPPanelButtonConfiguration/secondaryAction)

An optional action button to display in the panel.

## Relationships

### Conforms To

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

[`NSCoding`](/documentation/Foundation/NSCoding)

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

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

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

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

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

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

### Inherited By

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

### 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)