<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSButton/ButtonType/onOff",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@E@NSButtonType@NSButtonTypeOnOff"
  },
  "title" : "NSButton.ButtonType.onOff"
}
-->

# NSButton.ButtonType.onOff

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

```
case onOff
```

## Discussion

When the value of [`state`](/documentation/AppKit/NSButton/state) is [`off`](/documentation/AppKit/NSControl/StateValue/off), the button displays its normal bezel. When [`state`](/documentation/AppKit/NSButton/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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)