A lightweight SwiftUI library providing VFlowGrid
and HFlowGrid
for laying out views in a flowing stack, either vertically or horizontally.
Import the library and SwiftUI:
import FlowGrids
import SwiftUI
Creates a flowed grid with customizable row and item alignment:
VFlowGrid(rowAlignment: .leading, itemAlignment: .bottom, rowSpacing: 5, itemSpacing: 5) {
ForEach(generateSportTags(), content: Tag.init(item:))
}

- Vertical (
VFlowGrid
) and horizontal (HFlowGrid
) flow layout; - Customizable alignment, spacing, and item arrangement;
- Works seamlessly with
SwiftUI
views.


- iOS 16.0+
- macCatalyst 16.0+
- macOS 13.0+
- tvOS 16.0+
- visionOS 1.0+
- watchOS 9.0+
To use SwiftUI Flow Grids, add the package to your Xcode project:
- Open Xcode and go to File > Add Packages.
- Enter the repository URL.
- Choose Add Package.
To install this library using Swift Package Manager, add the following to your Package.swift
file:
dependencies: [
.package(url: "https://github.com/zijievv/swiftui-flow-grids.git", from: "0.1.0"),
]
This project is available under the MIT License.
Contributions are welcome! Feel free to open issues or submit pull requests.