The main title text. Can be a plain string or a styled component.
string
A system symbol name (SF Symbols) displayed as a large icon above the title.
string | Component
Descriptive text shown below the title. Can be a plain string or a styled component.
Component
A custom label component replacing the default title + icon layout.
Component[]
Optional action buttons or additional content displayed below the description.
Support
Usage
Empty search results
ContentUnavailableView({ title: "No Results", systemImage: "magnifyingglass", description: "Try a different search term."})
No content state
ContentUnavailableView({ title: "No Photos", systemImage: "photo.on.rectangle", description: "Photos you take will appear here."})
With action button
ContentUnavailableView({ title: "No Internet Connection", systemImage: "wifi.slash", description: "Check your connection and try again."}, [ Button("Retry", () => refresh())])
Custom label
ContentUnavailableView({ label: VStack([ Image({ systemName: "folder" }) .foregroundStyle(Color("gray")), Text("No Documents") .font("title2") ]), description: "Create a new document to get started."}, [ Button("New Document", () => createDocument())])