---
title: "Content Unavailable Search Text | Explore SwiftUI"
description: "A pre-built placeholder for empty search results with search text. Learn how to use Content Unavailable Search Text in SwiftUI with visual code examples."
canonical_url: "https://exploreswiftui.com/library/contentunavailableview/content-unavailable-search-text"
meta:
  author: "Explore SwiftUI"
  "og:description": "A pre-built placeholder for empty search results with search text. Learn how to use Content Unavailable Search Text in SwiftUI with visual code examples."
  "og:image": "https://exploreswiftui.com/_og/d/c_Component%2Ctitle_Content%2BUnavailable%2BSearch%2BText%2Cdescription_A%2Bpre-built%2Bplaceholder%2Bfor%2Bempty%2Bsearch%2Bresults%2Bwith%2Bsearch%2Btext%2Ccategory_ContentUnavailableView%2Cimage_~L2FwaS9pbWFnZXMvMy92YXJpYW50cy8xMD92PTE3OTAwNzM0Nzg4NDImcj0yJnc9MTI4MCZxPTg1JmY9anBlZw%2CimageMode_crop%2CimagePosition_center%2CimageFrame_~cG9zaXRpb246IGFic29sdXRlOyByaWdodDogMDsgd2lkdGg6IDY0MHB4OyBoZWlnaHQ6IDQ4MHB4OyBkaXNwbGF5OiBmbGV4OyBvdmVyZmxvdzogaGlkZGVuOyBiYWNrZ3JvdW5kOiAjRkZGRkZGOyBib3gtc2hhZG93OiAwIC0xMHB4IDUwcHggcmdiYSgzNyw5OSwyMzUsMC4xOCk7IGJvcmRlci1sZWZ0OiAxcHggc29saWQgcmdiYSgwLDAsMCwwLjA2KTsgdG9wOiA3NXB4OyBib3JkZXItdG9wOiAxcHggc29saWQgcmdiYSgwLDAsMCwwLjA2KTsgYm9yZGVyLWJvdHRvbTogMXB4IHNvbGlkIHJnYmEoMCwwLDAsMC4wNik7IGJvcmRlci10b3AtbGVmdC1yYWRpdXM6IDMycHg7IGJvcmRlci1ib3R0b20tbGVmdC1yYWRpdXM6IDMycHg7%2Cprops_eyJwbGF0Zm9ybXMiOlsiaU9TIiwiaVBhZE9TIiwibWFjT1MiLCJ3YXRjaE9TIiwidHZPUyIsInZpc2lvbk9TIl19%2Cp_Ii9saWJyYXJ5L2NvbnRlbnR1bmF2YWlsYWJsZXZpZXcvY29udGVudC11bmF2YWlsYWJsZS1zZWFyY2gtdGV4dCI%2Cs_991uN9_uS8LYNHhm.png"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "Content Unavailable Search Text | Explore SwiftUI"
  "twitter:description": "A pre-built placeholder for empty search results with search text. Learn how to use Content Unavailable Search Text in SwiftUI with visual code examples."
  "twitter:image": "https://exploreswiftui.com/_og/d/c_Component%2Ctitle_Content%2BUnavailable%2BSearch%2BText%2Cdescription_A%2Bpre-built%2Bplaceholder%2Bfor%2Bempty%2Bsearch%2Bresults%2Bwith%2Bsearch%2Btext%2Ccategory_ContentUnavailableView%2Cimage_~L2FwaS9pbWFnZXMvMy92YXJpYW50cy8xMD92PTE3OTAwNzM0Nzg4NDImcj0yJnc9MTI4MCZxPTg1JmY9anBlZw%2CimageMode_crop%2CimagePosition_center%2CimageFrame_~cG9zaXRpb246IGFic29sdXRlOyByaWdodDogMDsgd2lkdGg6IDY0MHB4OyBoZWlnaHQ6IDQ4MHB4OyBkaXNwbGF5OiBmbGV4OyBvdmVyZmxvdzogaGlkZGVuOyBiYWNrZ3JvdW5kOiAjRkZGRkZGOyBib3gtc2hhZG93OiAwIC0xMHB4IDUwcHggcmdiYSgzNyw5OSwyMzUsMC4xOCk7IGJvcmRlci1sZWZ0OiAxcHggc29saWQgcmdiYSgwLDAsMCwwLjA2KTsgdG9wOiA3NXB4OyBib3JkZXItdG9wOiAxcHggc29saWQgcmdiYSgwLDAsMCwwLjA2KTsgYm9yZGVyLWJvdHRvbTogMXB4IHNvbGlkIHJnYmEoMCwwLDAsMC4wNik7IGJvcmRlci10b3AtbGVmdC1yYWRpdXM6IDMycHg7IGJvcmRlci1ib3R0b20tbGVmdC1yYWRpdXM6IDMycHg7%2Cprops_eyJwbGF0Zm9ybXMiOlsiaU9TIiwiaVBhZE9TIiwibWFjT1MiLCJ3YXRjaE9TIiwidHZPUyIsInZpc2lvbk9TIl19%2Cp_Ii9saWJyYXJ5L2NvbnRlbnR1bmF2YWlsYWJsZXZpZXcvY29udGVudC11bmF2YWlsYWJsZS1zZWFyY2gtdGV4dCI%2Cs_991uN9_uS8LYNHhm.png"
  "twitter:title": "Content Unavailable Search Text | Explore SwiftUI"
---

> Index of every page on this site: [llms.txt](https://exploreswiftui.com/llms.txt)

**Interactive previews**[ iPhone](https://exploreswiftui.com/iphone?element=3)

# **Content Unavailable Search Text**

A pre-built placeholder for empty search results with search text

![Content Unavailable Search Text - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/3/variants/10?v=1790073478842&r=2&w=800&q=80&f=webp)

### **Platform Compatibility**

iOS 17.0+ iPadOS 17.0+ macOS 14.0+ watchOS 10.0+ tvOS 17.0+ visionOS 1.0+

### **Tags**

### **SwiftUI Code**

[ Docs](<https://developer.apple.com/documentation/swiftui/contentunavailableview/search(text:)>)

```
ContentUnavailableView.search(text: "foo")
```

### **Found an issue or have a suggestion?**

Created: May 28, 2025Updated: December 27, 2025

![Connect Wizard](https://exploreswiftui.com/_ipx/f_webp&q_80&s_48x48/images/connect-wizard-icon.png)

**Connect Wizard**

**Unlock insights App Store Connect doesn’t show you.**

[** Get Started **](https://apps.apple.com/app/apple-store/id6747314580?pt=121213751&ct=Explore%20SwiftUI%20Banner&mt=8)

### **More ContentUnavailableView Components **

[**View all **](https://exploreswiftui.com/library/contentunavailableview)

![Content Unavailable - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/4/variants/37?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Content Unavailable**

A placeholder for empty results with optional button

![Content Unavailable Search - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/1/variants/14?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Content Unavailable Search**

A pre-built placeholder for empty search results

### **Explore Other Components **

[**Browse all **](https://exploreswiftui.com/)

![Tab Badge - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/156/variants/677?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Tab Badge**

Generates a badge for a tab from an integer value.

![Background Extension Effect - iPadOS - Landscape - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/91/variants/422?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Background Extension Effect**

Adds the background extension effect to the view. The view will be duplicated into mirrored copies which will be placed around the view on any edge with available safe area. Additionally, a blur effect will be applied on top to blur out the copies

![Capsule Text Field - macOS - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/240/variants/186?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Capsule Text Field**

Gives your text field a capsule shape. This only has a visible effect on macOS, where the capsule shape is not the default.

![Custom Preview Item ShareLink  - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/75/variants/92?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Custom Preview Item ShareLink **

Creates an instance, with a custom label, that presents the share interface

![Stepped Slider - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/50/variants/273?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Stepped Slider**

Creates a slider to select a value from a given range, subject to a step increment

![Menu Divider - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/20/variants/128?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Menu Divider**

A Menu with a Divider

![GraphicalDatePickerStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/62/variants/420?v=1790073478842&r=2&w=412&q=75&f=webp)

### **GraphicalDatePickerStyle**

A date picker style that displays an interactive calendar or clock

![SwitchToggleStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/211/variants/640?v=1790073478842&r=2&w=412&q=75&f=webp)

### **SwitchToggleStyle**

A toggle style that displays a leading label and a trailing switch.

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://exploreswiftui.com/#website","@type":"WebSite","description":"A visual library for SwiftUI APIs, components, and modifiers","inLanguage":"en-US","name":"Explore SwiftUI","url":"https://exploreswiftui.com/","publisher":{"@id":"https://exploreswiftui.com/#identity"}},{"@id":"https://exploreswiftui.com/library/contentunavailableview/content-unavailable-search-text#webpage","@type":"WebPage","dateModified":"2025-12-27T14:16:50.603Z","datePublished":"2025-05-28T19:34:08.653Z","description":"A pre-built placeholder for empty search results with search text. Learn how to use Content Unavailable Search Text in SwiftUI with visual code examples.","name":"Content Unavailable Search Text","url":"https://exploreswiftui.com/library/contentunavailableview/content-unavailable-search-text","breadcrumb":{"@id":"https://exploreswiftui.com/library/contentunavailableview/content-unavailable-search-text#breadcrumb"},"isPartOf":{"@id":"https://exploreswiftui.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://exploreswiftui.com/library/contentunavailableview/content-unavailable-search-text"]}],"primaryImageOfPage":{"@id":"https://exploreswiftui.com/#logo"}},{"@id":"https://exploreswiftui.com/#identity","@type":"Organization","description":"A visual library for SwiftUI APIs, components, and modifiers","name":"Explore SwiftUI","url":"https://exploreswiftui.com","logo":{"@id":"https://exploreswiftui.com/#logo"},"sameAs":["https://x.com/Typ0genius","https://mastodon.social/@Typ0genius"]},{"@id":"https://exploreswiftui.com/library/contentunavailableview/content-unavailable-search-text#article","dateModified":"2025-12-27T14:16:50.603Z","datePublished":"2025-05-28T19:34:08.653Z","description":"A pre-built placeholder for empty search results with search text. Learn how to use Content Unavailable Search Text in SwiftUI with visual code examples.","headline":"Content Unavailable Search Text","inLanguage":"en-US","name":"Content Unavailable Search Text","thumbnailUrl":"https://exploreswiftui.com/api/images/3/variants/10?v=1790073478842&r=2","url":"https://exploreswiftui.com/library/contentunavailableview/content-unavailable-search-text","@type":["Article","TechArticle"],"about":{"@type":"Thing","name":"SwiftUI"},"author":{"@id":"https://exploreswiftui.com/#identity"},"image":{"@id":"https://exploreswiftui.com/#/schema/image/1"},"isPartOf":{"@type":"WebSite","name":"Explore SwiftUI","url":"https://exploreswiftui.com"},"mainEntityOfPage":{"@id":"https://exploreswiftui.com/library/contentunavailableview/content-unavailable-search-text#webpage"},"publisher":{"@id":"https://exploreswiftui.com/#identity"}},{"@id":"https://exploreswiftui.com/library/contentunavailableview/content-unavailable-search-text#/schema/software-source-code/1","@type":"SoftwareSourceCode","codeRepository":"https://developer.apple.com/documentation/swiftui/contentunavailableview/search(text:)","codeSampleType":"full example","description":"A pre-built placeholder for empty search results with search text. Learn how to use Content Unavailable Search Text in SwiftUI with visual code examples.","name":"Content Unavailable Search Text SwiftUI Example","programmingLanguage":"Swift","runtimePlatform":"SwiftUI","text":"ContentUnavailableView.search(text: \"foo\")\n","about":[{"@type":"Thing","name":"SwiftUI"},{"@type":"Thing","name":"ContentUnavailableView"},{"@type":"Thing","name":"Content Unavailable Search Text"}]},{"@id":"https://exploreswiftui.com/library/contentunavailableview/content-unavailable-search-text#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://exploreswiftui.com","position":1},{"@type":"ListItem","name":"ContentUnavailableView","item":"https://exploreswiftui.com/library/contentunavailableview","position":2},{"@type":"ListItem","name":"Content Unavailable Search Text","item":"https://exploreswiftui.com/library/contentunavailableview/content-unavailable-search-text","position":3}]},{"@id":"https://exploreswiftui.com/#logo","@type":"ImageObject","caption":"Explore SwiftUI","contentUrl":"https://exploreswiftui.com/apple-touch-icon.png","inLanguage":"en","url":"https://exploreswiftui.com/apple-touch-icon.png"},{"@id":"https://exploreswiftui.com/#/schema/image/1","@type":"ImageObject","contentUrl":"https://exploreswiftui.com/api/images/3/variants/10?v=1790073478842&r=2","inLanguage":"en","url":"https://exploreswiftui.com/api/images/3/variants/10?v=1790073478842&r=2"}]}
```