struct LazyVStack
Swift
struct LazyVStack<Data, Content> where Data : RandomAccessCollection, Content : View, Data.Index == Int
A vertically scrolling list that mounts only the rows the viewport shows.
LazyVGrid with a single full-width column; the same rules apply — fixed
rowHeight, must live inside a ScrollView(.vertical), cell state does not
survive scrolling.
Sources/LavaUI/LazyGrid.swift:165
Constructors
init(_ data: Data, rowHeight: Float, spacing: Float = 0, scrollTarget: Int? = nil, @ViewBuilder content: @escaping (Data.Element) -> Content)
Creates a lazy list. Every parameter matches the property of the same name.
Sources/LavaUI/LazyGrid.swift:180
Properties
var body: some View { get }
Not documented.
Sources/LavaUI/LazyGrid.swift:194
var content: (Data.Element) -> Content
Builds the row for one element. Called only for elements that are on screen.
Sources/LavaUI/LazyGrid.swift:177
var data: Data
The elements, one row each.
Sources/LavaUI/LazyGrid.swift:168
var rowHeight: Float
Height of every row, in points.
Sources/LavaUI/LazyGrid.swift:170
var scrollTarget: Int?
Index whose row should stay visible as keyboard selection moves, or nil
to leave scrolling to the pointer and wheel.
Sources/LavaUI/LazyGrid.swift:175
var spacing: Float
Space between rows, in points.
Sources/LavaUI/LazyGrid.swift:172