---
title: cancel
framework: swiftui
role: symbol
role_heading: Type Property
path: swiftui/buttonrole/cancel
---

# cancel

A role that indicates a button that cancels an operation.

## Declaration

```swift
static let cancel: ButtonRole
```

## Discussion

Discussion Use this role for a button that cancels the current operation. Unlike confirmation, a cancel action implies progress will be lost by performing the operation.

## See Also

### Getting button roles

- [destructive](swiftui/buttonrole/destructive.md)
