---
title: ScrollGeometry
framework: swiftui
role: symbol
role_heading: Structure
path: swiftui/scrollgeometry
---

# ScrollGeometry

A type that defines the geometry of a scroll view.

## Declaration

```swift
struct ScrollGeometry
```

## Overview

Overview SwiftUI provides you values of this type when using modifiers like View/onScrollGeometryChange(_:action:) or onScrollPhaseChange(_:).

## Topics

### Initializers

- [init(contentOffset:contentSize:contentInsets:containerSize:)](swiftui/scrollgeometry/init(contentoffset:contentsize:contentinsets:containersize:).md)

### Instance Properties

- [bounds](swiftui/scrollgeometry/bounds.md)
- [containerSize](swiftui/scrollgeometry/containersize.md)
- [contentInsets](swiftui/scrollgeometry/contentinsets.md)
- [contentOffset](swiftui/scrollgeometry/contentoffset.md)
- [contentSize](swiftui/scrollgeometry/contentsize.md)
- [visibleRect](swiftui/scrollgeometry/visiblerect.md)

## Relationships

### Conforms To

- [Copyable](swift/copyable.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Responding to scroll view changes

- [onScrollGeometryChange(for:of:action:)](swiftui/view/onscrollgeometrychange(for:of:action:).md)
- [onScrollTargetVisibilityChange(idType:threshold:_:)](swiftui/view/onscrolltargetvisibilitychange(idtype:threshold:_:).md)
- [onScrollVisibilityChange(threshold:_:)](swiftui/view/onscrollvisibilitychange(threshold:_:).md)
- [onScrollPhaseChange(_:)](swiftui/view/onscrollphasechange(_:).md)
- [ScrollPhase](swiftui/scrollphase.md)
- [ScrollPhaseChangeContext](swiftui/scrollphasechangecontext.md)
