<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: -",
    "tvOS: 15.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIButton/configuration-5rlyb",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "s:So8UIButtonC5UIKitE13configurationAbCE13ConfigurationVSgvp"
  },
  "title" : "configuration"
}
-->

# configuration

The configuration for the button’s appearance.

```
@MainActor @preconcurrency var configuration: UIButton.Configuration? { get set }
```

## Discussion

Setting a configuration opts the button into a configuration system based on [`UIButton.Configuration`](/documentation/UIKit/UIButton/Configuration-swift.struct). This configuration supports several options and behaviors unavailable with other configuration methods. Features include subtitle labels, extended control over background appearance, ways to transform the button configuration when the button changes state, and integration with macOS when building with Mac Catalyst.

When using a configuration, the button ignores deprecated methods and properties of [`UIButton`](/documentation/UIKit/UIButton). You can combine most other methods and properties of [`UIButton`](/documentation/UIKit/UIButton) with a configuration. If you have existing code to configure a button, you can set this property to take advantage of additional configuration features.

If the configuration is `nil`, other supported properties and methods of [`UIButton`](/documentation/UIKit/UIButton), such as [`setTitle(_:for:)`](/documentation/UIKit/UIButton/setTitle(_:for:)) , control the appearance of the button.

---

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)