---
title: menuBarHeight
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsmenu/menubarheight
---

# menuBarHeight

The menu bar height for the main menu in pixels.

## Declaration

```swift
var menuBarHeight: CGFloat { get }
```

## Discussion

Discussion For the main menu, the value of this property is a value of type CGFloat, indicating the height of the menu bar in pixels. For any other menu, the value of this property is 0. This property supersedes the menuBarHeight class method of the NSMenuView class.

## See Also

### Managing the Menu Bar

- [menuBarVisible()](appkit/nsmenu/menubarvisible().md)
- [setMenuBarVisible(_:)](appkit/nsmenu/setmenubarvisible(_:).md)
