<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: -",
    "tvOS: 14.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIBarButtonItem/init(systemItem:primaryAction:menu:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "s:So15UIBarButtonItemC5UIKitE06systemC013primaryAction4menuABSo0ab6SystemC0V_So8UIActionCSgSo6UIMenuCSgtcfc"
  },
  "title" : "init(systemItem:primaryAction:menu:)"
}
-->

# init(systemItem:primaryAction:menu:)

Creates an item using the specified system item, primary action, and context menu.

```
@MainActor @preconcurrency convenience init(systemItem: UIBarButtonItem.SystemItem, primaryAction: UIAction? = nil, menu: UIMenu? = nil)
```

## Parameters

`systemItem`

The system item to use as the first item on the bar. For possible values, see [`UIBarButtonItem.SystemItem`](/documentation/UIKit/UIBarButtonItem/SystemItem).

`primaryAction`

A [`UIAction`](/documentation/UIKit/UIAction) to associate with the item. The system item doesn’t use the action to configure its title and image.

`menu`

The menu to present. The context menu displays in response to a person tapping the item.

## Return Value

A newly initialized [`UIBarButtonItem`](/documentation/UIKit/UIBarButtonItem).

## Discussion

---

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)