---
title: "Custom Label | Explore SwiftUI"
description: "Creates a label with a custom title and icon. Learn how to use Custom Label in SwiftUI with visual code examples for iOS, macOS, watchOS, tvOS, and visionOS."
canonical_url: "https://exploreswiftui.com/library/label/custom-label"
meta:
  author: "Explore SwiftUI"
  "og:description": "Creates a label with a custom title and icon. Learn how to use Custom Label in SwiftUI with visual code examples for iOS, macOS, watchOS, tvOS, and visionOS."
  "og:image": "https://exploreswiftui.com/_og/d/c_Component%2Ctitle_Custom%2BLabel%2Cdescription_Creates%2Ba%2Blabel%2Bwith%2Ba%2Bcustom%2Btitle%2Band%2Bicon.%2Ccategory_Label%2Cimage_~L2FwaS9pbWFnZXMvMTQ4L3ZhcmlhbnRzLzQ3MD92PTE3OTAwNzM0Nzg4NDImcj0yJnc9MTI4MCZxPTg1JmY9anBlZw%2CimageMode_crop%2CimagePosition_center%2CimageFrame_~cG9zaXRpb246IGFic29sdXRlOyByaWdodDogMDsgd2lkdGg6IDY0MHB4OyBoZWlnaHQ6IDQ4MHB4OyBkaXNwbGF5OiBmbGV4OyBvdmVyZmxvdzogaGlkZGVuOyBiYWNrZ3JvdW5kOiAjRkZGRkZGOyBib3gtc2hhZG93OiAwIC0xMHB4IDUwcHggcmdiYSgzNyw5OSwyMzUsMC4xOCk7IGJvcmRlci1sZWZ0OiAxcHggc29saWQgcmdiYSgwLDAsMCwwLjA2KTsgdG9wOiA3NXB4OyBib3JkZXItdG9wOiAxcHggc29saWQgcmdiYSgwLDAsMCwwLjA2KTsgYm9yZGVyLWJvdHRvbTogMXB4IHNvbGlkIHJnYmEoMCwwLDAsMC4wNik7IGJvcmRlci10b3AtbGVmdC1yYWRpdXM6IDMycHg7IGJvcmRlci1ib3R0b20tbGVmdC1yYWRpdXM6IDMycHg7%2Cprops_eyJwbGF0Zm9ybXMiOlsiaU9TIiwiaVBhZE9TIiwibWFjT1MiLCJ3YXRjaE9TIiwidHZPUyIsInZpc2lvbk9TIl19%2Cp_Ii9saWJyYXJ5L2xhYmVsL2N1c3RvbS1sYWJlbCI%2Cs_zk9tJ6s9QzxBTirg.png"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "Custom Label | Explore SwiftUI"
  "twitter:description": "Creates a label with a custom title and icon. Learn how to use Custom Label in SwiftUI with visual code examples for iOS, macOS, watchOS, tvOS, and visionOS."
  "twitter:image": "https://exploreswiftui.com/_og/d/c_Component%2Ctitle_Custom%2BLabel%2Cdescription_Creates%2Ba%2Blabel%2Bwith%2Ba%2Bcustom%2Btitle%2Band%2Bicon.%2Ccategory_Label%2Cimage_~L2FwaS9pbWFnZXMvMTQ4L3ZhcmlhbnRzLzQ3MD92PTE3OTAwNzM0Nzg4NDImcj0yJnc9MTI4MCZxPTg1JmY9anBlZw%2CimageMode_crop%2CimagePosition_center%2CimageFrame_~cG9zaXRpb246IGFic29sdXRlOyByaWdodDogMDsgd2lkdGg6IDY0MHB4OyBoZWlnaHQ6IDQ4MHB4OyBkaXNwbGF5OiBmbGV4OyBvdmVyZmxvdzogaGlkZGVuOyBiYWNrZ3JvdW5kOiAjRkZGRkZGOyBib3gtc2hhZG93OiAwIC0xMHB4IDUwcHggcmdiYSgzNyw5OSwyMzUsMC4xOCk7IGJvcmRlci1sZWZ0OiAxcHggc29saWQgcmdiYSgwLDAsMCwwLjA2KTsgdG9wOiA3NXB4OyBib3JkZXItdG9wOiAxcHggc29saWQgcmdiYSgwLDAsMCwwLjA2KTsgYm9yZGVyLWJvdHRvbTogMXB4IHNvbGlkIHJnYmEoMCwwLDAsMC4wNik7IGJvcmRlci10b3AtbGVmdC1yYWRpdXM6IDMycHg7IGJvcmRlci1ib3R0b20tbGVmdC1yYWRpdXM6IDMycHg7%2Cprops_eyJwbGF0Zm9ybXMiOlsiaU9TIiwiaVBhZE9TIiwibWFjT1MiLCJ3YXRjaE9TIiwidHZPUyIsInZpc2lvbk9TIl19%2Cp_Ii9saWJyYXJ5L2xhYmVsL2N1c3RvbS1sYWJlbCI%2Cs_zk9tJ6s9QzxBTirg.png"
  "twitter:title": "Custom Label | Explore SwiftUI"
---

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

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

# **Custom Label**

Creates a label with a custom title and icon.

![Custom Label - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/148/variants/470?v=1790073478842&r=2&w=800&q=80&f=webp)

### **Platform Compatibility**

iOS 14.0+ iPadOS 14.0+ macOS 11.0+ watchOS 7.0+ tvOS 14.0+ visionOS 1.0+

### **Tags**

### **SwiftUI Code**

[ Docs](<https://developer.apple.com/documentation/swiftui/label/init(title:icon:)>)

```
Label {
    Text("Foo")
    Text("Bar")
} icon: {
    Image(systemName: "1.circle")
    Image(systemName: "2.circle")
}
```

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

Created: February 15, 2026Updated: February 15, 2026

### **More Label Components **

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

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

### **Label Styles**

Sets the style for labels within this view.

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

### **Image Label**

Creates a label with an icon image and a title generated from a localized string.

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

### **System Image Label**

Creates a label with a system icon image and a title generated from a localized string.

### **Explore Other Components **

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

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

### **RenameButton**

A button that triggers a standard rename action

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

### **ViewThatFits**

A view that adapts to the available space by providing the first child view that fits.

![Tab View Side Bar Footer - iPadOS - Landscape - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/168/variants/735?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Tab View Side Bar Footer**

Adds a custom footer to the sidebar of a tab view.

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

### **Swipe Action**

Adds custom swipe actions to a row in a list or container, notifying you when the actions are revealed or dismissed.

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

### **Multiple Sources Toggle**

Creates a toggle that updates the selected property for all sources. Once toggled, all sources will have the same value.

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

### **Refreshable List**

Marks this view as refreshable.

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

### **CheckboxToggleStyle**

A toggle style that displays a checkbox followed by its label.

![Hidden List Section Separator - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview](https://exploreswiftui.com/api/images/119/variants/293?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Hidden List Section Separator**

Sets whether to hide the separator associated with a list section.

```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/label/custom-label#webpage","@type":"WebPage","dateModified":"2026-02-15T10:50:34.576Z","datePublished":"2026-02-15T10:50:34.576Z","description":"Creates a label with a custom title and icon. Learn how to use Custom Label in SwiftUI with visual code examples for iOS, macOS, watchOS, tvOS, and visionOS.","name":"Custom Label","url":"https://exploreswiftui.com/library/label/custom-label","breadcrumb":{"@id":"https://exploreswiftui.com/library/label/custom-label#breadcrumb"},"isPartOf":{"@id":"https://exploreswiftui.com/#website"},"mainEntity":{"@id":"https://exploreswiftui.com/library/label/custom-label#article"},"potentialAction":[{"@type":"ReadAction","target":["https://exploreswiftui.com/library/label/custom-label"]}],"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/label/custom-label#article","citation":"https://developer.apple.com/documentation/swiftui/label/init(title:icon:)","dateModified":"2026-02-15T10:50:34.576Z","datePublished":"2026-02-15T10:50:34.576Z","description":"Creates a label with a custom title and icon. Learn how to use Custom Label in SwiftUI with visual code examples for iOS, macOS, watchOS, tvOS, and visionOS.","headline":"Custom Label","inLanguage":"en-US","name":"Custom Label","thumbnailUrl":"https://exploreswiftui.com/api/images/148/variants/470?v=1790073478842&r=2","url":"https://exploreswiftui.com/library/label/custom-label","@type":["Article","TechArticle"],"about":{"@type":"Thing","name":"SwiftUI"},"author":{"@id":"https://exploreswiftui.com/#identity"},"hasPart":{"@id":"https://exploreswiftui.com/library/label/custom-label#source-code"},"image":{"@id":"https://exploreswiftui.com/#/schema/image/1"},"isPartOf":{"@id":"https://exploreswiftui.com/library/label/custom-label#webpage"},"mainEntityOfPage":{"@id":"https://exploreswiftui.com/library/label/custom-label#webpage"},"publisher":{"@id":"https://exploreswiftui.com/#identity"}},{"@id":"https://exploreswiftui.com/library/label/custom-label#source-code","@type":"SoftwareSourceCode","codeSampleType":"full example","description":"Creates a label with a custom title and icon. Learn how to use Custom Label in SwiftUI with visual code examples for iOS, macOS, watchOS, tvOS, and visionOS.","name":"Custom Label SwiftUI Example","programmingLanguage":"Swift","runtimePlatform":"SwiftUI","text":"Label {\n    Text(\"Foo\")\n    Text(\"Bar\")\n} icon: {\n    Image(systemName: \"1.circle\")\n    Image(systemName: \"2.circle\")\n}","about":[{"@type":"Thing","name":"SwiftUI"},{"@type":"Thing","name":"Label"},{"@type":"Thing","name":"Custom Label"}]},{"@id":"https://exploreswiftui.com/library/label/custom-label#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://exploreswiftui.com","position":1},{"@type":"ListItem","name":"Label","item":"https://exploreswiftui.com/library/label","position":2},{"@type":"ListItem","name":"Custom Label","item":"https://exploreswiftui.com/library/label/custom-label","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/148/variants/470?v=1790073478842&r=2","inLanguage":"en","url":"https://exploreswiftui.com/api/images/148/variants/470?v=1790073478842&r=2"}]}
```