---
title: Attachment
framework: realitykit
role: symbol
role_heading: Structure
path: realitykit/attachment
---

# Attachment

An attachment content you can use to gather an identifier and view.

## Declaration

```swift
@MainActor @preconcurrency struct Attachment<Content> where Content : View
```

## Topics

### Initializers

- [init(id:_:)](realitykit/attachment/init(id:_:).md)

### Instance Properties

- [content](realitykit/attachment/content.md)
- [id](realitykit/attachment/id.md)

## Relationships

### Conforms To

- [AttachmentContent](realitykit/attachmentcontent.md)
- [Copyable](swift/copyable.md)
- [Escapable](swift/escapable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### SwiftUI view attachments

- [RealityViewAttachmentBuilderContent](realitykit/realityviewattachmentbuildercontent.md)
- [RealityViewAttachments](realitykit/realityviewattachments.md)
- [ViewAttachmentEntity](realitykit/viewattachmententity.md)
- [ViewAttachmentComponent](realitykit/viewattachmentcomponent.md)
- [PresentationComponent](realitykit/presentationcomponent.md)
- [TextComponent](realitykit/textcomponent.md)
