<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/DocumentCreationContext/creationSource",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI23DocumentCreationContextV14creationSourceAA0cdG0VSgvp"
  },
  "title" : "creationSource"
}
-->

# creationSource

The source associated with the button that created this document.

```
var creationSource: DocumentCreationSource? { get }
```

## Discussion

On iOS, you can specify the source using a [`NewDocumentButton`](/documentation/SwiftUI/NewDocumentButton) in
[`DocumentGroupLaunchScene`](/documentation/SwiftUI/DocumentGroupLaunchScene). On macOS, this is always `nil`.

---

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)