Does not seem doable in SwiftUI as of macOS 12. Will see what's announced in the next WWDC.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: