<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/Anchor/Source",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI6AnchorV6SourceV"
  },
  "title" : "Anchor.Source"
}
-->

# Anchor.Source

A type-erased geometry value that produces an anchored value of a given
type.

```
@frozen struct Source
```

## Overview

SwiftUI passes anchored geometry values around the view tree via
preference keys. It then converts them back into the local coordinate
space using a [`GeometryProxy`](/documentation/SwiftUI/GeometryProxy) value.

## Topics

### Getting point anchor sources

[`static   point ( _ :)`](/documentation/SwiftUI/Anchor/Source/point(_:))

[`static   unitPoint ( _ :)`](/documentation/SwiftUI/Anchor/Source/unitPoint(_:))

### Getting rectangle anchor sources

[`rect(_:)`](/documentation/SwiftUI/Anchor/Source/rect(_:))

Returns an anchor source rect defined by `r` in the current view.

[`bounds`](/documentation/SwiftUI/Anchor/Source/bounds)

An anchor source rect defined as the entire bounding rect of the current
view.

### Getting top anchor sources

[`topLeading`](/documentation/SwiftUI/Anchor/Source/topLeading)

[`top`](/documentation/SwiftUI/Anchor/Source/top)

[`topTrailing`](/documentation/SwiftUI/Anchor/Source/topTrailing)

### Getting middle anchor sources

[`leading`](/documentation/SwiftUI/Anchor/Source/leading)

[`center`](/documentation/SwiftUI/Anchor/Source/center-869al)

[`trailing`](/documentation/SwiftUI/Anchor/Source/trailing)

### Getting bottom anchor sources

[`bottomTrailing`](/documentation/SwiftUI/Anchor/Source/bottomTrailing)

[`bottom`](/documentation/SwiftUI/Anchor/Source/bottom)

[`bottomLeading`](/documentation/SwiftUI/Anchor/Source/bottomLeading)

### Creating an anchor source

[`init ( _ :)`](/documentation/SwiftUI/Anchor/Source/init(_:))

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

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)