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

# document

The current document model.

## Declaration

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

## Discussion

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 is false, setting a new value has no effect because the document is in viewing mode.

## See Also

### Getting and setting the document

- [$document](swiftui/filedocumentconfiguration/$document.md)
