---
title: creationSource
framework: swiftui
role: symbol
role_heading: Instance Property
path: swiftui/filedocumentconfiguration/creationsource
---

# creationSource

The source associated with the button that created this document.

## Declaration

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

## Discussion

Discussion On iOS, you can specify the source via a NewDocumentButton in DocumentGroupLaunchScene: extension DocumentCreationSource {     static let scanner: Self =         DocumentCreationSource(id: "document-from-scanner")

static let template: Self =         DocumentCreationSource(id: "document-from-template") }

DocumentGroupLaunchScene("Documents") {     NewDocumentButton("Scan Document", source: .scanner)     NewDocumentButton("New from Template", source: .template) } Use this property to determine which NewDocumentButton triggered the creation of the current document, allowing you to customize the UI accordingly.
