<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ZStackContent3D",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI15ZStackContent3DV"
  },
  "title" : "ZStackContent3D"
}
-->

# ZStackContent3D

A type that adds spacing to a [`ZStack`](/documentation/SwiftUI/ZStack).

```
@frozen nonisolated struct ZStackContent3D<Content> where Content : View
```

## Overview

You don’t create this type directly. SwiftUI creates it for you when you use the
`ZStack(alignment:spacing:content)` initializer.

## Topics

### Initializers

[`init(spacing: CGFloat?, content: Content)`](/documentation/SwiftUI/ZStackContent3D/init(spacing:content:))

### Instance Properties

[`var content: Content`](/documentation/SwiftUI/ZStackContent3D/content)

[`var spacing: CGFloat?`](/documentation/SwiftUI/ZStackContent3D/spacing)

## Relationships

### Conforms To

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

[`View`](/documentation/SwiftUI/View)

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

---

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)