<!--
{
  "availability" : [
    "watchOS: 6.0.0 - 27.2.0"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/Alert/sideBySideButtons(title:message:primaryButton:secondaryButton:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI5AlertV17sideBySideButtons5title7message13primaryButton09secondaryK0AcA4TextV_AJSgAC0K0VAMtFZ"
  },
  "title" : "sideBySideButtons(title:message:primaryButton:secondaryButton:)"
}
-->

# sideBySideButtons(title:message:primaryButton:secondaryButton:)

Creates a side by side button alert.

```
static func sideBySideButtons(title: Text, message: Text? = nil, primaryButton: Alert.Button, secondaryButton: Alert.Button) -> Alert
```

## Parameters

`title`

The title of the alert.

`message`

The message to display in the body of the alert.

`primaryButton`

The first button to show in the alert.

`secondaryButton`

The second button to show in the alert.

## Discussion

The system determines the visual ordering of the buttons.

---

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)