---
title: "onCutCommand(perform:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/oncutcommand(perform:)"
---

# onCutCommand(perform:)

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

## Declaration

```swift
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

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

## See Also

### Copying items using item providers

- [onCopyCommand(perform:)](swiftui/view/oncopycommand(perform:).md)
- [onPasteCommand(of:perform:)](swiftui/view/onpastecommand(of:perform:).md)
- [onPasteCommand(of:validator:perform:)](swiftui/view/onpastecommand(of:validator:perform:).md)
