/TableGrid

A custom grid-based layout to mimic Table in SwiftUI.

Primary LanguageSwift

TableGrid

A custom grid-based layout to mimic Table in SwiftUI.

Goals

  • Provide more customization options vs. SwiftUI's macOS Table API
  • Opaque styling, vs. Grid, which exposes individual views
    • (e.g., can't put a .background() on a GridRow without some modifier tricks)

Example

// This is a work in progress!
TableGrid {
    TableGridHeader {
        Text("hello")
        Text("there")
    }
    TableGridRow {
        Text("one.one")
        Text("one.two")
    }
    TableGridRow {
        Text("two.one")
        Text("two.twoooooo")
    }
}