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

# Alert.Button

A button that represents an operation of an alert presentation.

```
struct Button
```

## Topics

### Getting a button

[`default(_:action:)`](/documentation/SwiftUI/Alert/Button/default(_:action:))

Creates an alert button with the default style.

[`cancel(_:)`](/documentation/SwiftUI/Alert/Button/cancel(_:))

Creates an alert button that indicates cancellation, with a
system-provided label.

[`cancel(_:action:)`](/documentation/SwiftUI/Alert/Button/cancel(_:action:))

Creates an alert button that indicates cancellation, with a custom
label.

[`destructive(_:action:)`](/documentation/SwiftUI/Alert/Button/destructive(_:action:))

Creates an alert button with a style that indicates a destructive
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)