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

# NSStatusBar

An object that manages a collection of status items displayed within the system-wide menu bar.

```
class NSStatusBar
```

## Overview

A status item (an instance of [`NSStatusItem`](/documentation/AppKit/NSStatusItem)) can be displayed with text or an icon, can provide a menu and a target-action message when clicked, or can be a fully customized view that you create. Use status items sparingly and only if the alternatives (such as a Dock menu, preference pane, or status window) are not suitable. Because there is limited space in which to display status items, status items are not guaranteed to be available at all times. For this reason, do not rely on them being available and always provide a user preference for hiding your application’s status items to free up space in the menu bar.

## Topics

### Getting the System-Wide Instance

[`systemStatusBar`](/documentation/AppKit/NSStatusBar/system)

Returns the system-wide status bar located in the menu bar.

### Managing Status items

[`-  statusItemWithLength:`](/documentation/AppKit/NSStatusBar/statusItem(withLength:))

Returns a newly created status item that has been allotted a specified space within the status bar.

[`-  removeStatusItem:`](/documentation/AppKit/NSStatusBar/removeStatusItem(_:))

Removes the specified status item from the receiver.

### Getting Status-Bar Attributes

[`vertical`](/documentation/AppKit/NSStatusBar/isVertical)

A Boolean value indicating whether the status bar has a vertical orientation.

[`thickness`](/documentation/AppKit/NSStatusBar/thickness)

The thickness of the status bar, in pixels.

### Constants

[Status Bar Item Length](/documentation/AppKit/status-bar-item-length)

Constants used by the [`statusItem(withLength:)`](/documentation/AppKit/NSStatusBar/statusItem(withLength:)) method.

## Relationships

### Conforms To

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Hashable`](/documentation/Swift/Hashable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`Equatable`](/documentation/Swift/Equatable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)