Navigation Container Background
Sets the container background of the enclosing container using a view.
Platform Compatibility
Tags
SwiftUI Code
NavigationStack {
Text("Foo")
.containerBackground(.blue.gradient, for: .navigation)
}Found an issue or have a suggestion?
More View Components
View allToolbar Vertical Edge
This value reflects the system’s preferred edge for the vertical bar in the current context, regardless of whether a vertical bar is currently visible. Use it to position custom bars or other UI relative to the system’s bar placement.
Music Picker
Presents a music picker to select items from the Apple Music catalog and the user’s music library.
Explore Other Components
Browse allCustom List Section Spacing
Sets the spacing between adjacent sections in a List to a custom value.
EllipticalListStyle
The list style that describes the behavior and appearance of an elliptical list.
Custom Placeholder Async URL Image
Loads and displays a modifiable image from the specified URL load request using a custom placeholder until the image loads.
Hide Sidebar Toggle
Removes the sidebar toggle toolbar item a NavigationSplitView adds by default.
Default Adaptable Tab Bar Placement
Specifies the default placement for the tabs in a tab view using the adaptable sidebar style.
Sheet Background Interaction
Controls whether people can interact with the view behind a presentation.