<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSClipView/documentRect",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSClipView(py)documentRect"
  },
  "title" : "documentRect"
}
-->

# documentRect

The rectangle defining the document view’s frame, adjusted to the size of the clip view if the document view is smaller.

```
var documentRect: NSRect { get }
```

## Discussion

The document rectangle is used in conjunction with an [`NSClipView`](/documentation/AppKit/NSClipView) object’s bounds rectangle to determine values for the indicators of relative position and size between the [`NSClipView`](/documentation/AppKit/NSClipView) and its document view. For example, [`NSScrollView`](/documentation/AppKit/NSScrollView) uses these rectangles to set the size and position of the knobs in its scrollers. When the document view is much larger than the [`NSClipView`](/documentation/AppKit/NSClipView), the knob is small; when the document view is near the same size, the knob is large; and when the document view is the same size or smaller, there is no knob.

## See Also

[`reflectScrolledClipView(_:)`](/documentation/AppKit/NSScrollView/reflectScrolledClipView(_:))

Adjusts the receiver’s scrollers to reflect the size and positioning of its content view.



---

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)