<!--
{
  "availability" : [
    "iOS: 18.0.0 - 27.2.0",
    "iPadOS: 18.0.0 - 27.2.0",
    "macCatalyst: 18.0.0 - 27.2.0",
    "macOS: 15.0.0 - 27.2.0",
    "visionOS: 2.0.0 - 27.2.0"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/TabViewCustomization/subscript(sectionID:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Subscript",
  "symbol" : {
    "kind" : "Instance Subscript",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI20TabViewCustomizationV9sectionIDSaySSGSgSS_tcip"
  },
  "title" : "subscript(sectionID:)"
}
-->

# subscript(sectionID:)

The customization for a section’s children, identified by the
section’s customization identifier.

```
subscript(sectionID id: String) -> [String]? { get }
```

## Overview

Section order can be read by subscripting with the tab section’s id:

```
let order = customization[sectionID: "com.myApp.categories"]
```

Identifiers can be associated with a `Tab` or `TabSection` using the
`customizationID(_:)` modifier.

```
TabSection("Categories") {
    Tab("Climate", systemImage: "fan") {
        ClimateView()
    }
    .customizationID("com.myApp.climate")

    Tab("Lights", systemImage: "lightbulb") {
        LightsView()
    }
    .customizationID("com.myApp.lights")
}
.customizationID("com.myApp.categories")
```

If the ID isn’t associated with a section or the section has not been customized,
a default value of `nil` is returned.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)