<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/DocumentBaseBox",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI15DocumentBaseBoxP"
  },
  "title" : "DocumentBaseBox"
}
-->

# DocumentBaseBox

A Box that allows setting its Document base
not requiring the caller to know the exact types of the box and its base.

```
protocol DocumentBaseBox<Document> : AnyObject
```

## Topics

### Specifying the document type

[`associatedtype Document`](/documentation/SwiftUI/DocumentBaseBox/Document)

The underlying document type.

### Accessing the document

[`var base: Self.Document?`](/documentation/SwiftUI/DocumentBaseBox/base)

Updates the underlying document to a new value.



---

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)