<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSMenuItem/separator()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSMenuItem(cm)separatorItem"
  },
  "title" : "separator()"
}
-->

# separator()

Returns a menu item that is used to separate logical groups of menu commands.

```
class func separator() -> NSMenuItem
```

## Return Value

A menu item that is used to separate logical groups of menu commands.

## Discussion

This menu item is disabled. The default separator item is blank space.

## See Also

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

A Boolean value that indicates whether the menu item is enabled.



---

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)