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

# document

The current document model.

```
@Binding var document: Document { get nonmutating set }
```

## Discussion

Setting a new value marks the document as having changes for later
saving and registers an undo action to restore the model to its
previous value.

If [`isEditable`](/documentation/SwiftUI/FileDocumentConfiguration/isEditable) is `false`, setting a new value has no effect
because the document is in viewing mode.

---

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)