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

# NSButton.ButtonType.switch

A standard checkbox button.

```
case `switch`
```

## Discussion

A switch button provides the same toggling behavior as a [`NSButton.ButtonType.toggle`](/documentation/AppKit/NSButton/ButtonType/toggle) button. In addition to configuring that behavior, this button type configures [`isBordered`](/documentation/AppKit/NSButton/isBordered) to <doc://com.apple.documentation/documentation/Swift/false> and provides a standard checkbox image.

Checkboxes are ideal for controlling a Boolean state within your application. The mixed state of a checkbox, enabled through the [`allowsMixedState`](/documentation/AppKit/NSButton/allowsMixedState) property, is useful for summarizing multiple Boolean states of varying values.

This option corresponds to the Switch 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)