---
title: AlarmAttributes
framework: alarmkit
role: symbol
role_heading: Structure
path: alarmkit/alarmattributes
---

# AlarmAttributes

An object that contains all information necessary for the alarm UI.

## Declaration

```swift
struct AlarmAttributes<Metadata> where Metadata : AlarmMetadata
```

## Overview

Overview This struct includes alerting, countdown, and paused states. You define all the alarm information when creating the attributes. When archiving the widget, the widget extension selects which state to display based on the AlarmPresentationState provided in the activity content state payload. The following example defines the attributes for the alarm UI. let attributes = AlarmAttributes(     presentation: presentation,     metadata: metadata,     tintColor: Color.white)

## Topics

### Creating an alarm attribute

- [init(presentation:metadata:tintColor:)](alarmkit/alarmattributes/init(presentation:metadata:tintcolor:).md)
- [tintColor](alarmkit/alarmattributes/tintcolor.md)
- [presentation](alarmkit/alarmattributes/presentation.md)
- [metadata](alarmkit/alarmattributes/metadata.md)
- [AlarmAttributes.ContentState](alarmkit/alarmattributes/contentstate.md)

### Decoding and encoding

- [init(from:)](alarmkit/alarmattributes/init(from:).md)
- [encode(to:)](alarmkit/alarmattributes/encode(to:).md)

## Relationships

### Conforms To

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

## See Also

### Views

- [AlarmPresentation](alarmkit/alarmpresentation.md)
- [AlarmPresentationState](alarmkit/alarmpresentationstate.md)
- [AlarmMetadata](alarmkit/alarmmetadata.md)
