<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/swipeActionsContainer()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE21swipeActionsContainerQryF"
  },
  "title" : "swipeActionsContainer()"
}
-->

# swipeActionsContainer()

Coordinates swipe action dismissal and mutual
exclusion across rows in a container.

```
nonisolated func swipeActionsContainer() -> some View
```

## Discussion

Apply this modifier to a `ScrollView` or other
container that holds rows using the
[`swipeActions(edge:allowsFullSwipe:content:)`](/documentation/SwiftUI/View/swipeActions(edge:allowsFullSwipe:content:))
modifier. The container ensures that:

- Only one row’s swipe actions are revealed at
  a time.
- Scrolling the container dismisses any open
  actions.
- Tapping outside the active row dismisses its
  actions.

`List` provides this coordination automatically.
Use `swipeActionsContainer()` when building custom
row-based layouts that use `ScrollView`,
`LazyVStack`, or similar containers.

```
ScrollView {
    LazyVStack {
        ForEach(items) { item in
            ItemRow(item)
                .swipeActions {
                    Button("Delete", role: .destructive) {
                        delete(item)
                    }
                }
        }
    }
}
.swipeActionsContainer()
```

Applying this modifier to a `List` is a no-op,
since `List` already provides this coordination.

---

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)