<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/VStackLayout",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI12VStackLayoutV"
  },
  "title" : "VStackLayout"
}
-->

# VStackLayout

A vertical container that you can use in conditional layouts.

```
@frozen struct VStackLayout
```

## Overview

This layout container behaves like a [`VStack`](/documentation/SwiftUI/VStack), but conforms to the
[`Layout`](/documentation/SwiftUI/Layout) protocol so you can use it in the conditional layouts that you
construct with [`AnyLayout`](/documentation/SwiftUI/AnyLayout). If you don’t need a conditional layout, use
[`VStack`](/documentation/SwiftUI/VStack) instead.

## Topics

### Creating a vertical stack

[`init(alignment:spacing:)`](/documentation/SwiftUI/VStackLayout/init(alignment:spacing:))

Creates a vertical stack with the specified spacing and horizontal
alignment.

### Getting the stack’s properties

[`alignment`](/documentation/SwiftUI/VStackLayout/alignment)

The horizontal alignment of subviews.

[`spacing`](/documentation/SwiftUI/VStackLayout/spacing)

The distance between adjacent subviews.

## Relationships

### Conforms To

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

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

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

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

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

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

---

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)