<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/LazyVStack",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI10LazyVStackV"
  },
  "title" : "LazyVStack"
}
-->

# LazyVStack

A view that arranges its children in a line that grows vertically,
creating items only as needed.

```
nonisolated struct LazyVStack<Content> where Content : View
```

## Overview

The stack is “lazy,” in that the stack view doesn’t create items until
it needs to render them onscreen.

In the following example, a [`ScrollView`](/documentation/SwiftUI/ScrollView) contains a `LazyVStack` that
consists of a vertical row of text views. The stack aligns to the
leading edge of the scroll view, and uses default spacing between the
text views.

```
ScrollView {
    LazyVStack(alignment: .leading) {
        ForEach(1...100, id: \.self) {
            Text("Row \($0)")
        }
    }
}
```

## Topics

### Creating a lazy-loading vertical stack

[`init(alignment:spacing:pinnedViews:content:)`](/documentation/SwiftUI/LazyVStack/init(alignment:spacing:pinnedViews:content:))

Creates a lazy vertical stack view with the given spacing,
vertical alignment, pinning behavior, and content.



---

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)