---
title: rect
framework: webkit
role: symbol
role_heading: Instance Property
path: webkit/wksnapshotconfiguration/rect
---

# rect

The portion of your web view to capture, specified as a rectangle in the view’s coordinate system.

## Declaration

```swift
var rect: CGRect { get set }
```

## Discussion

Discussion The default value of this property is CGRectNull, which captures everything in the view’s bounds rectangle. If you specify a custom rectangle, it must lie within the bounds rectangle of the WKWebView object.

## See Also

### Specifying the snapshot dimensions

- [snapshotWidth](webkit/wksnapshotconfiguration/snapshotwidth.md)
