---
title: "init(anchor:)"
framework: swiftui
role: symbol
role_heading: Initializer
path: "swiftui/viewalignedscrolltargetbehavior/init(anchor:)"
---

# init(anchor:)

Creates a view aligned scroll behavior with the provided anchor.

## Declaration

```swift
init(anchor: UnitPoint?)
```
