Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A SwiftUI library providing flow grids for flexible vertical and horizontal flow layouts.

License

zijievv/swiftui-flow-grids

Repository files navigation

SwiftUI Flow Grids

A lightweight SwiftUI library providing VFlowGrid and HFlowGrid for laying out views in a flowing stack, either vertically or horizontally.

Usage

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:))
}
Screenshot 2025年03月06日 at 22 36 22

Features

  • Vertical (VFlowGrid) and horizontal (HFlowGrid) flow layout;
  • Customizable alignment, spacing, and item arrangement;
  • Works seamlessly with SwiftUI views.
Screenshot 2025年03月06日 at 22 03 53 Screenshot 2025年03月06日 at 22 08 22

Requirements

  • iOS 16.0+
  • macCatalyst 16.0+
  • macOS 13.0+
  • tvOS 16.0+
  • visionOS 1.0+
  • watchOS 9.0+

Installation

To use SwiftUI Flow Grids, add the package to your Xcode project:

  1. Open Xcode and go to File > Add Packages.
  2. Enter the repository URL.
  3. 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"),
]

License

This project is available under the MIT License.

Contributions

Contributions are welcome! Feel free to open issues or submit pull requests.

About

A SwiftUI library providing flow grids for flexible vertical and horizontal flow layouts.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

AltStyle によって変換されたページ (->オリジナル) /