---
title: "Section Index Label and Visibility | Explore SwiftUI"
description: "Sets the label that is used in a section index to point to this section, typically only a single character long.

  Changes the visibility of the list section index"
canonical_url: "https://exploreswiftui.com/library/list/section-index-label-and-visibility"
meta:
  author: "Explore SwiftUI"
  "og:description": "Sets the label that is used in a section index to point to this section, typically only a single character long.

    Changes the visibility of the list section index"
  "og:image": "https://exploreswiftui.com/_og/d/c_Component%2Ctitle_Section%2BIndex%2BLabel%2Band%2BVisibility%2Cdescription_~U2V0cyB0aGUgbGFiZWwgdGhhdCBpcyB1c2VkIGluIGEgc2VjdGlvbiBpbmRleCB0byBwb2ludCB0byB0aGlzIHNlY3Rpb24sIHR5cGljYWxseSBvbmx5IGEgc2luZ2xlIGNoYXJhY3RlciBsb25nLgpDaGFuZ2VzIHRoZSB2aXNpYmlsaXR5IG9mIHRoZSBsaXN0IHNlY3Rpb24gaW5kZXgu%2Ccategory_List%2Cimage_~L2FwaS9pbWFnZXMvMTI5L3ZhcmlhbnRzLzM2OT92PTE3OTAwNzM0Nzg4NDImcj0yJnc9MTI4MCZxPTg1JmY9anBlZw%2CimageMode_crop%2CimagePosition_center%2CimageFrame_~cG9zaXRpb246IGFic29sdXRlOyByaWdodDogMDsgd2lkdGg6IDY0MHB4OyBoZWlnaHQ6IDQ4MHB4OyBkaXNwbGF5OiBmbGV4OyBvdmVyZmxvdzogaGlkZGVuOyBiYWNrZ3JvdW5kOiAjRkZGRkZGOyBib3gtc2hhZG93OiAwIC0xMHB4IDUwcHggcmdiYSgzNyw5OSwyMzUsMC4xOCk7IGJvcmRlci1sZWZ0OiAxcHggc29saWQgcmdiYSgwLDAsMCwwLjA2KTsgdG9wOiA3NXB4OyBib3JkZXItdG9wOiAxcHggc29saWQgcmdiYSgwLDAsMCwwLjA2KTsgYm9yZGVyLWJvdHRvbTogMXB4IHNvbGlkIHJnYmEoMCwwLDAsMC4wNik7IGJvcmRlci10b3AtbGVmdC1yYWRpdXM6IDMycHg7IGJvcmRlci1ib3R0b20tbGVmdC1yYWRpdXM6IDMycHg7%2Cprops_eyJwbGF0Zm9ybXMiOlsiaU9TIiwiaVBhZE9TIiwibWFjT1MiLCJ3YXRjaE9TIiwidHZPUyIsInZpc2lvbk9TIl19%2Cp_Ii9saWJyYXJ5L2xpc3Qvc2VjdGlvbi1pbmRleC1sYWJlbC1hbmQtdmlzaWJpbGl0eSI%2Cs_xtM8AMHVUIvEUTwE.png"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "Section Index Label and Visibility | Explore SwiftUI"
  "twitter:description": "Sets the label that is used in a section index to point to this section, typically only a single character long.

    Changes the visibility of the list section index"
  "twitter:image": "https://exploreswiftui.com/_og/d/c_Component%2Ctitle_Section%2BIndex%2BLabel%2Band%2BVisibility%2Cdescription_~U2V0cyB0aGUgbGFiZWwgdGhhdCBpcyB1c2VkIGluIGEgc2VjdGlvbiBpbmRleCB0byBwb2ludCB0byB0aGlzIHNlY3Rpb24sIHR5cGljYWxseSBvbmx5IGEgc2luZ2xlIGNoYXJhY3RlciBsb25nLgpDaGFuZ2VzIHRoZSB2aXNpYmlsaXR5IG9mIHRoZSBsaXN0IHNlY3Rpb24gaW5kZXgu%2Ccategory_List%2Cimage_~L2FwaS9pbWFnZXMvMTI5L3ZhcmlhbnRzLzM2OT92PTE3OTAwNzM0Nzg4NDImcj0yJnc9MTI4MCZxPTg1JmY9anBlZw%2CimageMode_crop%2CimagePosition_center%2CimageFrame_~cG9zaXRpb246IGFic29sdXRlOyByaWdodDogMDsgd2lkdGg6IDY0MHB4OyBoZWlnaHQ6IDQ4MHB4OyBkaXNwbGF5OiBmbGV4OyBvdmVyZmxvdzogaGlkZGVuOyBiYWNrZ3JvdW5kOiAjRkZGRkZGOyBib3gtc2hhZG93OiAwIC0xMHB4IDUwcHggcmdiYSgzNyw5OSwyMzUsMC4xOCk7IGJvcmRlci1sZWZ0OiAxcHggc29saWQgcmdiYSgwLDAsMCwwLjA2KTsgdG9wOiA3NXB4OyBib3JkZXItdG9wOiAxcHggc29saWQgcmdiYSgwLDAsMCwwLjA2KTsgYm9yZGVyLWJvdHRvbTogMXB4IHNvbGlkIHJnYmEoMCwwLDAsMC4wNik7IGJvcmRlci10b3AtbGVmdC1yYWRpdXM6IDMycHg7IGJvcmRlci1ib3R0b20tbGVmdC1yYWRpdXM6IDMycHg7%2Cprops_eyJwbGF0Zm9ybXMiOlsiaU9TIiwiaVBhZE9TIiwibWFjT1MiLCJ3YXRjaE9TIiwidHZPUyIsInZpc2lvbk9TIl19%2Cp_Ii9saWJyYXJ5L2xpc3Qvc2VjdGlvbi1pbmRleC1sYWJlbC1hbmQtdmlzaWJpbGl0eSI%2Cs_xtM8AMHVUIvEUTwE.png"
  "twitter:title": "Section Index Label and Visibility | Explore SwiftUI"
---

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

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

# **Section Index Label and Visibility**

Sets the label that is used in a section index to point to this section, typically only a single character long. Changes the visibility of the list section index.

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

### **Platform Compatibility**

iOS 26.0+ iPadOS 26.0+ macOS 26.0+ watchOS 26.0+ tvOS 26.0+ visionOS 26.0+

### **Tags**

### **SwiftUI Code**

[ Docs](<https://developer.apple.com/documentation/swiftui/view/sectionindexlabel(_:)>)

```
let items = ["Foo", "Bar"]

var body: some View {
  List(items, id: \.self) { item in
  Section(item) {
    ForEach(0 ..< 42) { number in
    Text(String(describing: number))
  }
}
.sectionIndexLabel(item)
}
.listSectionIndexVisibility(.visible)

}
```

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

Created: August 10, 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 List Components **

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

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

### **Outline Group**

A structure that computes views and disclosure groups on demand from an underlying collection of tree-structured, identified data.

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

### **Disclosure Group**

A view that shows or hides another content view, based on the state of a disclosure control.

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

### **Edit Button**

A button that toggles the edit mode environment value.

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

### **Move Disabled**

Adds a condition for whether the view’s view hierarchy is movable.

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

### **Delete Disabled**

Adds a condition for whether the view’s view hierarchy is deletable.

![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.

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

### **Swipe Action**

Adds custom swipe actions to a row in a list.

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

### **List Badge Prominence**

Specifies the prominence of badges created by this view.

### **Explore Other Components **

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

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

### **DatePicker**

Creates an instance that selects a Date with an unbounded range

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

### **UIKit Separator Colors**

The UIKit separator colors that are also used in other components, such as the TextField

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

### **Button Sizing**

The preferred sizing behavior of buttons in the view hierarchy.

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

### **NavigationControlGroupStyle**

The navigation control group style

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

### **AccessoryLinearGaugeStyle**

A gauge style that displays bar with a marker that appears at a point along the bar to indicate the gauge’s current value

![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.

![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.

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

### **Hidden Index PageTabViewStyle**

A TabViewStyle that displays a paged scrolling TabView with a hidden index.

```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/list/section-index-label-and-visibility#webpage","@type":"WebPage","dateModified":"2025-12-27T10:04:27.385Z","datePublished":"2025-08-10T18:23:17.503Z","description":"Sets the label that is used in a section index to point to this section, typically only a single character long.\nChanges the visibility of the list section index","name":"Section Index Label and Visibility","url":"https://exploreswiftui.com/library/list/section-index-label-and-visibility","breadcrumb":{"@id":"https://exploreswiftui.com/library/list/section-index-label-and-visibility#breadcrumb"},"isPartOf":{"@id":"https://exploreswiftui.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://exploreswiftui.com/library/list/section-index-label-and-visibility"]}],"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/list/section-index-label-and-visibility#article","dateModified":"2025-12-27T10:04:27.385Z","datePublished":"2025-08-10T18:23:17.503Z","description":"Sets the label that is used in a section index to point to this section, typically only a single character long.\nChanges the visibility of the list section index","headline":"Section Index Label and Visibility","inLanguage":"en-US","name":"Section Index Label and Visibility","thumbnailUrl":"https://exploreswiftui.com/api/images/129/variants/369?v=1790073478842&r=2","url":"https://exploreswiftui.com/library/list/section-index-label-and-visibility","@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/list/section-index-label-and-visibility#webpage"},"publisher":{"@id":"https://exploreswiftui.com/#identity"}},{"@id":"https://exploreswiftui.com/library/list/section-index-label-and-visibility#/schema/software-source-code/1","@type":"SoftwareSourceCode","codeRepository":"https://developer.apple.com/documentation/swiftui/view/sectionindexlabel(_:)","codeSampleType":"full example","description":"Sets the label that is used in a section index to point to this section, typically only a single character long.\nChanges the visibility of the list section index","name":"Section Index Label and Visibility SwiftUI Example","programmingLanguage":"Swift","runtimePlatform":"SwiftUI","text":"let items = [\"Foo\", \"Bar\"]\n\nvar body: some View {\n  List(items, id: \\.self) { item in\n  Section(item) {\n    ForEach(0 ..\u003C 42) { number in\n    Text(String(describing: number))\n  }\n}\n.sectionIndexLabel(item)\n}\n.listSectionIndexVisibility(.visible)\n\n}","about":[{"@type":"Thing","name":"SwiftUI"},{"@type":"Thing","name":"List"},{"@type":"Thing","name":"Section Index Label and Visibility"}]},{"@id":"https://exploreswiftui.com/library/list/section-index-label-and-visibility#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://exploreswiftui.com","position":1},{"@type":"ListItem","name":"List","item":"https://exploreswiftui.com/library/list","position":2},{"@type":"ListItem","name":"Section Index Label and Visibility","item":"https://exploreswiftui.com/library/list/section-index-label-and-visibility","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/129/variants/369?v=1790073478842&r=2","inLanguage":"en","url":"https://exploreswiftui.com/api/images/129/variants/369?v=1790073478842&r=2"}]}
```