Swiftpack.co - alfianlosari/SwiftUIStaggeredList as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by alfianlosari.
alfianlosari/SwiftUIStaggeredList 0.1.4
Staggered Layout List Using SwiftUI
⭐️ 11
🕓 3 years ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/alfianlosari/SwiftUIStaggeredList.git", from: "0.1.4")


A Staggered Pinterest Like Layout using SwiftUI

Alt text


  • Add the dependency to your target/project using Swift Package Manager
  • Import framework in your source

How to use

Initialize StaggeredLayoutList passing your collection that conforms to Identifiable. Vertical and Horitontal Spacing can be passed for adding padding between items. Also Section Insets can be passed to add inset to the List.

StaggeredLayoutList(data: self.notes, numberOfColumns: self.numberOfColumns, horizontalSpacing: self.spacing, verticalSpacing: self.spacing, sectionInsets: sectionInset) {
    NoteView(note: $0)

Sample App (iOS, macOS, watchOS, tvOS)


Special Thanks

Inspired by objc.io Swift Talk Building Collection View talk at: https://talk.objc.io/episodes/S01E168-building-a-collection-view-part-2


Stars: 11
Last commit: 3 years ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

3 years ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics