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

# ScrollViewProxy

A proxy value that supports programmatic scrolling of the scrollable
views within a view hierarchy.

```
struct ScrollViewProxy
```

## Overview

You don’t create instances of `ScrollViewProxy` directly. Instead, your
[`ScrollViewReader`](/documentation/SwiftUI/ScrollViewReader) receives an instance of `ScrollViewProxy` in its
`content` content builder. You use actions within this content builder, such
as button and gesture handlers or the [`onChange(of:perform:)`](/documentation/SwiftUI/View/onChange(of:perform:))
method, to call the proxy’s [`scrollTo(_:anchor:)`](/documentation/SwiftUI/ScrollViewProxy/scrollTo(_:anchor:)) method.

## Topics

### Performing scrolling

[`scrollTo(_:anchor:)`](/documentation/SwiftUI/ScrollViewProxy/scrollTo(_:anchor:))

Scans all scroll views contained by the proxy for the first
with a child view with identifier `id`, and then scrolls to
that 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)