<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/offset(z:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE6offset1zQr14CoreFoundation7CGFloatV_tF"
  },
  "title" : "offset(z:)"
}
-->

# offset(z:)

Brings a view forward in Z by the provided distance in points.

```
@export(implementation) nonisolated func offset(z: CGFloat) -> some View
```

## Return Value

A view that is extruded forward in Z by `distance`.

---

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)