---
title: "Text Components | Explore SwiftUI"
description: "A view that displays one or more lines of read-only text. Explore 1 SwiftUI text components with code examples for iOS, macOS, watchOS, tvOS, and visionOS."
canonical_url: "https://exploreswiftui.com/library/text"
meta:
  author: "Explore SwiftUI"
  "og:description": "A view that displays one or more lines of read-only text. Explore 1 SwiftUI text components with code examples for iOS, macOS, watchOS, tvOS, and visionOS."
  "og:image": "https://exploreswiftui.com/_og/d/c_Default%2Ctitle_Text%2BComponents%2Cdescription_Explore%2B1%2BSwiftUI%2Bcomponents%2Bvisually%2Cp_Ii9saWJyYXJ5L3RleHQi%2Cs_GPGKOBXUhz5-5NHo.png"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "Text Components | Explore SwiftUI"
  "twitter:description": "A view that displays one or more lines of read-only text. Explore 1 SwiftUI text components with code examples for iOS, macOS, watchOS, tvOS, and visionOS."
  "twitter:image": "https://exploreswiftui.com/_og/d/c_Default%2Ctitle_Text%2BComponents%2Cdescription_Explore%2B1%2BSwiftUI%2Bcomponents%2Bvisually%2Cp_Ii9saWJyYXJ5L3RleHQi%2Cs_GPGKOBXUhz5-5NHo.png"
  "twitter:title": "Text Components | Explore SwiftUI"
---

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

# **Text Components**

A view that displays one or more lines of read-only text.

1 component

![Text Format - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview](https://exploreswiftui.com/api/images/99/variants/307?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Text Format**

Creates a text view that displays the formatted representation of a nonstring type supported by a corresponding format style.

```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/text#webpage","@type":"WebPage","description":"A view that displays one or more lines of read-only text. Explore 1 SwiftUI text components with code examples for iOS, macOS, watchOS, tvOS, and visionOS.","name":"Text Components","url":"https://exploreswiftui.com/library/text","breadcrumb":{"@id":"https://exploreswiftui.com/library/text#breadcrumb"},"isPartOf":{"@id":"https://exploreswiftui.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://exploreswiftui.com/library/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/text#collectionpage","@type":"CollectionPage","description":"A view that displays one or more lines of read-only text. Explore 1 SwiftUI text components with code examples for iOS, macOS, watchOS, tvOS, and visionOS.","inLanguage":"en-US","name":"Text Components","url":"https://exploreswiftui.com/library/text","about":{"@type":"Thing","name":"SwiftUI"},"isPartOf":{"@id":"https://exploreswiftui.com/#website"}},{"@id":"https://exploreswiftui.com/library/text#/schema/item-list/1","@type":"ItemList","name":"Text Components","itemListElement":[{"@type":"ListItem","position":1,"name":"Text Format","url":"https://exploreswiftui.com/library/text/text-format"}]},{"@id":"https://exploreswiftui.com/library/text#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://exploreswiftui.com","position":1},{"@type":"ListItem","name":"Text","item":"https://exploreswiftui.com/library/text","position":2}]},{"@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"}]}
```