The key is to use a Label for it to work on macOS
example:
Text("aaa")
.swipeActions {
Button {
//Do something
} label: {
Label("Delete", systemImage: "trash") //Use a label
}
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: