<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIMenuElement",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIMenuElement"
  },
  "title" : "UIMenuElement"
}
-->

# UIMenuElement

An object representing a menu, action, or command.

```
@MainActor class UIMenuElement
```

## Overview

[`UIMenuElement`](/documentation/UIKit/UIMenuElement) defines the behavior shared by all menus, actions, and commands. You don’t create [`UIMenuElement`](/documentation/UIKit/UIMenuElement) objects directly. Instead, you create an appropriate object that inherits from this class, such as [`UIMenu`](/documentation/UIKit/UIMenu), [`UIAction`](/documentation/UIKit/UIAction), or [`UICommand`](/documentation/UIKit/UICommand).

## Topics

### Getting the element attributes

[`title`](/documentation/UIKit/UIMenuElement/title)

The title of the menu element.

[`subtitle`](/documentation/UIKit/UIMenuElement/subtitle)

The subtitle to display alongside the menu element’s title.

[`image`](/documentation/UIKit/UIMenuElement/image)

The image to display alongside the menu element’s title.

### Creating a menu element

[`-  initWithCoder:`](/documentation/UIKit/UIMenuElement/init(coder:))

Creates a menu element from data in an unarchiver.

### Constants

[`Attributes`](/documentation/UIKit/UIMenuElement/Attributes)

Attributes that determine the style of the menu element.

[`State`](/documentation/UIKit/UIMenuElement/State)

Constants that indicate the state of an action- or command-based menu element.

[`RepeatBehavior`](/documentation/UIKit/UIMenuElement/RepeatBehavior)

Possible repeat behaviors for a menu element.

## Relationships

### Conforms To

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

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

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

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

[`NSCopying`](/documentation/Foundation/NSCopying)

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

[`NSCoding`](/documentation/Foundation/NSCoding)

[`UIAccessibilityIdentification`](/documentation/UIKit/UIAccessibilityIdentification)

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

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

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

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

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

### Inherited By

[`UIMenu`](/documentation/UIKit/UIMenu)

[`UIDeferredMenuElement`](/documentation/UIKit/UIDeferredMenuElement)

[`UICommand`](/documentation/UIKit/UICommand)

[`UIAction`](/documentation/UIKit/UIAction)

### 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)