Skip to content

Repository files navigation

MasonryStack

A Pinterest like layout in SwiftUI (horizontal & vertical).

Screen.Recording.2023-08-25.at.19.14.28.mov

Usage

Note At this point this does not support lazy loading. Keep this in mind when displaying large amounts of data.

The MasonryHStack and MasonryVStack can be used just like HStack or VStack:

import SwiftUI
import MasonryStack

struct ContentView: View {
  var body: some View {
    MasonryVStack(columns: 2, spacing: 20) {
      // ...
    }
  }
}

Both stacks conform to the Layout protocol so you can easily switch between other layouts as well.


Buy Me A Coffee

About

A Pinterest like layout in SwiftUI (horizontal & vertical).

Topics

Resources

Stars

195 stars

Watchers

4 watching

Forks

Releases

Sponsor this project

Contributors

Languages