<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/Alignment3D/init(horizontal:vertical:depth:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI11Alignment3DV10horizontal8vertical5depthAcA19HorizontalAlignmentV_AA08VerticalH0VAA05DepthH0Vtcfc"
  },
  "title" : "init(horizontal:vertical:depth:)"
}
-->

# init(horizontal:vertical:depth:)

Creates a custom alignment value with the specified horizontal, vertical
and depth alignment guides.

```
@export(implementation) init(horizontal: HorizontalAlignment, vertical: VerticalAlignment, depth: DepthAlignment)
```

## Parameters

`horizontal`

The alignment on the horizontal axis.

`vertical`

The alignment on the vertical axis.

`depth`

The alignment on the depth axis.

---

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)