---
title: AlarmPresentation.Alert
framework: alarmkit
role: symbol
role_heading: Structure
path: alarmkit/alarmpresentation/alert-swift.struct
---

# AlarmPresentation.Alert

An object that describes the UI of the alert that appears when an alarm fires.

## Declaration

```swift
struct Alert
```

## Overview

Overview Alert configures the title and buttons in the alarm UI. The system provides a stop button automatically. Use this object to optionally define a secondary button and its behavior. The code snippet below describes how to configure an Alert with a secondary button. let alert = AlarmPresentation.Alert(title: "Eggs are ready!",    secondaryButton: AlarmButton(text: "Repeat", textColor: .blue, systemImageName: "repeat"),    secondaryButtonBehavior: .countdown)

## Topics

### Creating an alert

- [init(title:secondaryButton:secondaryButtonBehavior:)](alarmkit/alarmpresentation/alert-swift.struct/init(title:secondarybutton:secondarybuttonbehavior:).md)
- [title](alarmkit/alarmpresentation/alert-swift.struct/title.md)

### Creating a second button

- [secondaryButton](alarmkit/alarmpresentation/alert-swift.struct/secondarybutton.md)
- [secondaryButtonBehavior](alarmkit/alarmpresentation/alert-swift.struct/secondarybuttonbehavior-swift.property.md)
- [AlarmPresentation.Alert.SecondaryButtonBehavior](alarmkit/alarmpresentation/alert-swift.struct/secondarybuttonbehavior-swift.enum.md)

### Deprecated

- [init(title:stopButton:secondaryButton:secondaryButtonBehavior:)](alarmkit/alarmpresentation/alert-swift.struct/init(title:stopbutton:secondarybutton:secondarybuttonbehavior:).md)
- [stopButton](alarmkit/alarmpresentation/alert-swift.struct/stopbutton.md)

## Relationships

### Conforms To

- [Decodable](swift/decodable.md)
- [Encodable](swift/encodable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Describing an alarm state

- [AlarmPresentation.Countdown](alarmkit/alarmpresentation/countdown-swift.struct.md)
- [AlarmPresentation.Paused](alarmkit/alarmpresentation/paused-swift.struct.md)
