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

# NSButton.ButtonType.switch

A standard checkbox button.

## Declaration

```swift
case `switch`
```

## Discussion

Discussion A switch button provides the same toggling behavior as a NSButton.ButtonType.toggle button. In addition to configuring that behavior, this button type configures isBordered to 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 property, is useful for summarizing multiple Boolean states of varying values. This option corresponds to the Switch 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.onOff](appkit/nsbutton/buttontype/onoff.md)
- [NSButton.ButtonType.toggle](appkit/nsbutton/buttontype/toggle.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)
