If your sidebar has a list, you can use the .listStyle modifier to give the list a diffferent style than the sidebar style, which is the default for a navigation split view on Mac. The following modifier creates a plain list style:
.listStyle(.plain)
If your sidebar doesn't have a list, show the code for it so people can provide an alternative to the .background modifier you used in your example.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: