<!--
{
  "availability" : [
    "*: -",
    "macOS: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSMenuItem/sectionHeader(withTitle:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "s:So10NSMenuItemC6AppKitE13sectionHeader9withTitleABSS_tFZ"
  },
  "title" : "sectionHeader(withTitle:)"
}
-->

# sectionHeader(withTitle:)

Returns a menu item representing a section header for a logical grouping of menu commands.

```
static func sectionHeader(withTitle title: String) -> NSMenuItem
```

## Parameters

`title`

The title string to display on the section header.

## Discussion

Use section headers to provide context to a group of menu items. Items created using this method are non-interactive and don’t perform actions.

---

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)