MacOS create sidebar on the right and left with SwiftUI

Hi Experts,

I would like to create a sidebar on the right of my MacOS SwiftUI app, like it is done in Xcode. Is there anyone who eventually knows how this is done?

Thx GP

I have trided multiple things but I cannot find the solutions. De left side works fine like this:

struct LeftSidebar: View {
    @EnvironmentObject var appState: AppState
    
    var body: some View {
        VStack {
            List {
                NavigationLink(destination: HomeMac()) {
                    Label("Home", systemImage: "house.fill")
                }
                
                Section(header: Text("SF-symbolen")) {
                    NavigationLink(destination: HomeMac()) {
                        Label("Alle", systemImage: "square.grid.2x2")
                    }
    //                NavigationLink(destination: NieuwView()) {
    //                    Label("Nieuw", systemImage: "star")
    //                }
                }
                
                Spacer()
                
                Button(action: {
                    appState.logOut()
                }) {
                    HStack {
                        Image(systemName: "arrow.backward.circle")
                        Text("Loguit")
                    }
                }
            }
            .listStyle(SidebarListStyle())
            .frame(minWidth: 50)
            
        }
        .padding()
    }
}
    
    var body: some View {
        ZStack {
                NavigationView {
                        LeftSidebar()
                            .environmentObject(appState)
                        
                        HomeMac()
                        
                        RightSidebar()
                }
                .frame(minWidth: 800, minHeight: 600)
        }
    }
}

But when I want to try this its not working the same.

MacOS create sidebar on the right and left with SwiftUI
 
 
Q