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

# ScrollTargetBehaviorContext

The context in which a scroll target behavior updates its scroll target.

```
@dynamicMemberLookup struct ScrollTargetBehaviorContext
```

## Topics

### Getting the scroll target behavior context

[`axes`](/documentation/SwiftUI/ScrollTargetBehaviorContext/axes)

The axes in which the scrollable view is scrollable.

[`containerSize`](/documentation/SwiftUI/ScrollTargetBehaviorContext/containerSize)

The size of the container of the scrollable view.

[`contentSize`](/documentation/SwiftUI/ScrollTargetBehaviorContext/contentSize)

The size of the content of the scrollable view.

[`originalTarget`](/documentation/SwiftUI/ScrollTargetBehaviorContext/originalTarget)

The original target when the scroll gesture began.

[`velocity`](/documentation/SwiftUI/ScrollTargetBehaviorContext/velocity)

The current velocity of the scrollable view’s scroll gesture.

### Accessing the context

[`subscript(dynamicMember:)`](/documentation/SwiftUI/ScrollTargetBehaviorContext/subscript(dynamicMember:))



---

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)