Content Unavailable View Template
Standard empty state template with icon, title, description, and action button.
SwiftUI Implementation
Pure Vanilla Swift • No DependenciescontentUnavailableBasic.swift
ContentUnavailableView {
VStack(spacing: 16) {
Image(systemName: "folder.badge.plus")
.font(.title)
Text("No items")
}
} description: {
Text("This folder is empty. Start building your library by adding a new item.")
.multilineTextAlignment(.center)
.frame(maxWidth: 450)
} actions: {
Button(
"Add New",
systemImage: "plus",
action: { toggleButton.toggle() }
)
.symbolEffect(.bounce, value: toggleButton)
.buttonRepeatBehavior(.enabled)
}Ready to copy and paste directly into any Xcode project running iOS 16.0+.
Recommended Use Cases
- Integrating into standard iOS placeholder workflows
- Polishing app UI with native iOS system styling
- Speeding up custom SwiftUI screen development
Component Details
- iOS Compatibility
- iOS 16.0+
- Xcode Version
- Xcode 15+
- Platform
- iOS
- License Tier
- Free
- Themes & Contexts
- list
- Keywords
- contentunavailabletemplate
C
Compot for iOS
Native SwiftUI playground app
Preview all 130+ components interactively on your device and copy code straight to Xcode with 1 tap.
Get Compot on the App StoreRelated SwiftUI Components
More components in Developer Templates & Architecture and related app architectures.
Settings, Lists & RowsiOS 16.0+
FAQ List with Disclosure Groups
Complete multi-item expandable FAQ section for help screens.
View Component & Code
Developer Templates & ArchitectureiOS 16.0+
App Styles Template
Architecture guide and code structure for centralized color palettes, padding constants, and corner radiuses.
View Component & Code
Developer Templates & ArchitectureiOS 16.0+
App Microcopy Template
Structured template for organizing all user-facing copy into strongly-typed constants.
View Component & Code