<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ButtonStyle",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI11ButtonStyleP"
  },
  "title" : "ButtonStyle"
}
-->

# ButtonStyle

A type that applies standard interaction behavior and a custom appearance to
all buttons within a view hierarchy.

```
@MainActor @preconcurrency protocol ButtonStyle
```

## Overview

To configure the current button style for a view hierarchy, use the
[`buttonStyle(_:)`](/documentation/SwiftUI/View/buttonStyle(_:)) modifier. Specify a style that conforms to
`ButtonStyle` when creating a button that uses the standard button
interaction behavior defined for each platform. To create a button with
custom interaction behavior, use [`PrimitiveButtonStyle`](/documentation/SwiftUI/PrimitiveButtonStyle) instead.

## Topics

### Custom button styles

[`makeBody(configuration:)`](/documentation/SwiftUI/ButtonStyle/makeBody(configuration:))

Creates a view that represents the body of a button.

[`ButtonStyle.Configuration`](/documentation/SwiftUI/ButtonStyle/Configuration)

The properties of a button.

[`Body`](/documentation/SwiftUI/ButtonStyle/Body)

A view that represents the body of a 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)