Skip to content

kaulex99/DynamicGrid

Repository files navigation

DynamicGrid

DynamicGrid is a horizontal stack for SwiftUI which moves the elements in the next line if there is not enough space in the current line.

Requirements

iOS 16+ and macOS 13+

Usage

The parameters horizontalSpacing and verticalSpacing are optional and default 0.

DynamicGrid(horizontalSpacing: 10, verticalSpacing: 10) {
    // other views
}

Preview

Preview Screenshot of the DynamicGrid

Preview GIF of the DynamicGrid