## Destructive action (delete)

- Use case: Confirming a delete: a heavy, unmistakable thud that says "this is significant".
- Feel: Heavy and rigid — noticeably weightier than any other tap in the app.
- APIs: .sensoryFeedback(.impact(weight: .heavy)), UIImpactFeedbackGenerator(style: .heavy)
- Minimum OS: iOS 17+ / iOS 10+

### SwiftUI (iOS 17+)

```swift
import SwiftUI

struct DeleteButton: View {
    let onDelete: () -> Void
    @State private var confirming = false
    @State private var deleted = 0

    var body: some View {
        Button(role: .destructive) {
            confirming = true
        } label: {
            Label("Delete item", systemImage: "trash")
        }
        .confirmationDialog("Delete this item?", isPresented: $confirming) {
            Button("Delete", role: .destructive) {
                deleted += 1
                onDelete()
            }
        }
        .sensoryFeedback(.impact(weight: .heavy), trigger: deleted)
    }
}
```

### UIKit

```swift
let haptic = UIImpactFeedbackGenerator(style: .heavy)

func confirmDelete() {
    haptic.prepare()
    let alert = UIAlertController(title: "Delete this item?",
                                  message: nil,
                                  preferredStyle: .actionSheet)
    alert.addAction(UIAlertAction(title: "Delete", style: .destructive) { _ in
        haptic.impactOccurred()
        // perform deletion
    })
    alert.addAction(UIAlertAction(title: "Cancel", style: .cancel))
    present(alert, animated: true)
}
```

### Notes
- Fire on the confirmed deletion, not on opening the confirmation dialog.
- If deletion can fail, pair with .error notification feedback on failure instead.
