Capsule UI (🚧 Work in Progress 🚧)
Capsule UI for AppKit and SwiftUI.
Installation
.package(url: "https://github.com/freyaalminde/capsule-ui.git", branch: "main"),
.product(name: "CapsuleUI", package: "capsule-ui"),
Overview
CapsuleList {
Capsule("Form Capsule") {
Form {
// …
}
}
Capsule("Table Capsule") {
CapsuleTable(data) {
// …
}
}
}
Table Usage
CapsuleTable(data, selection: $selection) {
CapsuleTableColumn("Name", value: \.name)
CapsuleTableColumn("Email Address", value: \.emailAddress)
}
Images
CapsuleTable(data, selection: $selection) {
CapsuleTableColumn("Name", value: \.name)
.withImage { row in
NSImage(systemSymbolName: "person", accessibilityDescription: nil)
}
CapsuleTableColumn("Email Address", value: \.emailAddress)
}