---
title: containerSize
framework: swiftui
role: symbol
role_heading: Instance Property
path: swiftui/scrolltargetbehaviorcontext/containersize
---

# containerSize

The size of the container of the scrollable view.

## Declaration

```swift
var containerSize: CGSize { get }
```

## Discussion

Discussion This is the size of the bounds of the scroll view subtracting any insets applied to the scroll view (like the safe area).

## See Also

### Getting the scroll target behavior context

- [axes](swiftui/scrolltargetbehaviorcontext/axes.md)
- [contentSize](swiftui/scrolltargetbehaviorcontext/contentsize.md)
- [originalTarget](swiftui/scrolltargetbehaviorcontext/originaltarget.md)
- [velocity](swiftui/scrolltargetbehaviorcontext/velocity.md)
