<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSMenuItem/state",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSMenuItem(py)state"
  },
  "title" : "state"
}
-->

# state

The state of the menu item.

```
var state: NSControl.StateValue { get set }
```

## Discussion

The image associated with the new state is displayed to the left of the menu item.

## See Also

[`offStateImage`](/documentation/AppKit/NSMenuItem/offStateImage)

The image of the menu item that indicates an “off” state.

[`mixedStateImage`](/documentation/AppKit/NSMenuItem/mixedStateImage)

The image of the menu item that indicates a “mixed” state, that is, a state neither “on” nor “off.”

[`onStateImage`](/documentation/AppKit/NSMenuItem/onStateImage)

The image of the menu item that indicates an “on” state.



---

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)