<!--
{
  "availability" : [
    "macOS: 10.15.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/onCutCommand(perform:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE12onCutCommand7performQrSaySo14NSItemProviderCGycSg_tF"
  },
  "title" : "onCutCommand(perform:)"
}
-->

# onCutCommand(perform:)

Adds an action to perform in response to the system’s Cut command.

```
nonisolated func onCutCommand(perform payloadAction: (() -> [NSItemProvider])?) -> some View
```

## Parameters

`payloadAction`

An action closure that should delete the selected
data and return
<doc://com.apple.documentation/documentation/Foundation/NSItemProvider> items
corresponding to that data, which should be written to the
Clipboard. If `action` is `nil`, the Cut command is considered
disabled.

## Return Value

A view that triggers `action` when a system Cut command
occurs.

---

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)