<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/TabContent/sectionActions(content:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI10TabContentPAAE14sectionActions7contentQrqd__yXE_tAA4ViewRd__lF"
  },
  "title" : "sectionActions(content:)"
}
-->

# sectionActions(content:)

Adds custom actions to a tab section.

```
nonisolated func sectionActions<Content>(@ContentBuilder content: () -> Content) -> some TabContent<Self.TabValue> where Content : View
```

## Discussion

On iOS, the actions are displayed after the other tabs
in the section. On macOS, the actions are displayed
when a user hovers over the section.

Applying this modifier to a single [`Tab`](/documentation/SwiftUI/Tab) has no effect.

The following example adds an ‘Add’ button to
the ‘Categories’ section.

```
TabView {
    Tab("Home", systemImage: "house") {
        HomeView()
    }

    Tab("Alerts", systemImage: "bell") {
        AlertsView()
    }

    TabSection("Categories") {
        Tab("Climate", systemImage: "fan") {
            ClimateView()
        }

        Tab("Lights", systemImage: "lightbulb") {
            LightsView()
        }
    }
    .sectionActions {
        Button("Add Category", systemImage: "plus") { }
    }
}
.tabViewStyle(.sidebarAdaptable)
```

---

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)