---
title: hasDestructiveAction
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsbutton/hasdestructiveaction
---

# hasDestructiveAction

A Boolean value that defines whether a button’s action has a destructive effect.

## Declaration

```swift
var hasDestructiveAction: Bool { get set }
```

## Discussion

Discussion The default value of hasDestructiveAction is false. Setting this to true allows the system to guard a destructive-action button against accidental presses, and can give the button a special appearance in certain contexts to caution against unintentional use.

## See Also

### Configuring buttons

- [setButtonType(_:)](appkit/nsbutton/setbuttontype(_:).md)
- [getPeriodicDelay(_:interval:)](appkit/nsbutton/getperiodicdelay(_:interval:).md)
- [setPeriodicDelay(_:interval:)](appkit/nsbutton/setperiodicdelay(_:interval:).md)
- [contentTintColor](appkit/nsbutton/contenttintcolor.md)
- [alternateTitle](appkit/nsbutton/alternatetitle.md)
- [attributedTitle](appkit/nsbutton/attributedtitle.md)
- [attributedAlternateTitle](appkit/nsbutton/attributedalternatetitle.md)
- [title](appkit/nsbutton/title.md)
- [symbolConfiguration](appkit/nsbutton/symbolconfiguration.md)
- [sound](appkit/nsbutton/sound.md)
- [isSpringLoaded](appkit/nsbutton/isspringloaded.md)
- [maxAcceleratorLevel](appkit/nsbutton/maxacceleratorlevel.md)
- [tintProminence](appkit/nsbutton/tintprominence.md)
- [NSTintProminence](appkit/nstintprominence.md)
- [borderShape](appkit/nsbutton/bordershape.md)
