Create a right sidebar like the Xcode Inspector in SwiftUI on macOS

Thanks in advance for the help, I am fairly new to SwiftUI still.

I have found that I can create another pane inside a NavigationView by adding another element the same as the left sidebar and main content, however I do not know how to give it sidebar-like behavior.

Specifically I would like to create behavior identical to the left sidebar (resizing to close, shifting a toggle button to the navigation toolbar when closed, etc). My understanding is that this is not directly supported like the left sidebar, but I would love some pointers or examples online if anybody has them!

Thanks again

I'm looking for the same solution.

I found a good start here https://www.hackingwithswift.com/quick-start/swiftui/how-to-add-and-remove-views-with-a-transition

Regards JC

Create a right sidebar like the Xcode Inspector in SwiftUI on macOS
 
 
Q