---
title: NSButton.ButtonType.onOff
framework: appkit
role: symbol
role_heading: Case
path: appkit/nsbutton/buttontype/onoff
---

# NSButton.ButtonType.onOff

A button that switches between a normal and emphasized bezel on each click.

## Declaration

```swift
case onOff
```

## Discussion

Discussion When the value of state is off, the button displays its normal bezel. When state has any other value, the button displays an emphasized variant of its bezel. Buttons of this type never display alternate content. This option corresponds to the On Off type in Interface Builder’s Attributes Inspector.

## See Also

### Configuring Button Behavior

- [NSButton.ButtonType.momentaryPushIn](appkit/nsbutton/buttontype/momentarypushin.md)
- [NSButton.ButtonType.momentaryLight](appkit/nsbutton/buttontype/momentarylight.md)
- [NSButton.ButtonType.momentaryChange](appkit/nsbutton/buttontype/momentarychange.md)
- [NSButton.ButtonType.pushOnPushOff](appkit/nsbutton/buttontype/pushonpushoff.md)
- [NSButton.ButtonType.toggle](appkit/nsbutton/buttontype/toggle.md)
- [NSButton.ButtonType.switch](appkit/nsbutton/buttontype/switch.md)
- [NSButton.ButtonType.radio](appkit/nsbutton/buttontype/radio.md)
- [NSButton.ButtonType.accelerator](appkit/nsbutton/buttontype/accelerator.md)
- [NSButton.ButtonType.multiLevelAccelerator](appkit/nsbutton/buttontype/multilevelaccelerator.md)
