<!--
{
  "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 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/SectionConfiguration/actions-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI20SectionConfigurationVAAE7actionsAcAE7ActionsVvp"
  },
  "title" : "actions"
}
-->

# actions

Custom actions associated with a section.

```
var actions: SectionConfiguration.Actions { get }
```

## Discussion

This property provides programmatic access to the actions defined on a
[`Section`](/documentation/SwiftUI/Section). If no actions were specified, the collection will be empty.
The following `MailboxView` will put actions into an overflow menu if
there are too many to display inline.

```
struct MailboxView<Content: View>: View {
    var content: Content

    init(@ContentBuilder content: () -> Content) {
        self.content = content()
    }

    var body: some View {
        ForEach(sections: content) { section in
            HStack {
                section.header
                Spacer()
                Group(subviews: section.actions) { actions in
                    if actions.count > 2 {
                        actions[0]
                        // Place the extras in an overflow menu.
                        Menu("Actions", systemImage: "plus") {
                            actions[1...]
                        }
                    } else {
                        actions
                    }
                }
            }
            section.content
        }
    }
}
```

You can then use actions in `MailboxView` without considering overflow.

```
MailboxView {
    Section("iCloud") {
        Label("Receipts", systemImage: "folder")
        Label("Mailing Lists", systemImage: "folder")
    }
    .sectionActions {
        Button("New", systemImage: "folder.badge.plus") {}
        Button("Edit", systemImage: "folder.badge.gearshape") {}
        Button("Delete", systemImage: "folder.badge.minus") {}
    }
}
```

---

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)