Interactive previews iPhone
Content Unavailable
A placeholder for empty results with optional button
Platform Compatibility
iOS 17.0+ iPadOS 17.0+ macOS 14.0+ watchOS 10.0+ tvOS 17.0+ visionOS 1.0+
Tags
SwiftUI Code
ContentUnavailableView {
Label("No Mail", systemImage: "tray.fill")
} description: {
Text("New mails you receive will appear here.")
} actions: {
Button("Switch Account") { }
.buttonStyle(.borderedProminent)
}Found an issue or have a suggestion?
Created: May 29, 2025Updated: December 27, 2025
More ContentUnavailableView Components
View allExplore Other Components
Browse allBoolean Sheet
Presents a sheet when a binding to a Boolean value that you provide is true. On watchOS, sheets are displayed as fullScreenCover.
Hidden Index PageTabViewStyle
A TabViewStyle that displays a paged scrolling TabView with a hidden index.
UIKit Content Background colors
The UIKit colors that are also used in other components like in List and GroupBox
Default Collapsed Tab Section
Sets the default expansion state for the section containing this tab to collapsed when displayed in the sidebar.