<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITextItem/MenuConfiguration/init(preview:menu:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "s:So27UITextItemMenuConfigurationC5UIKitE7preview4menuA2bCE7PreviewOSg_So6UIMenuCtcfc"
  },
  "title" : "init(preview:menu:)"
}
-->

# init(preview:menu:)

Creates a text item menu configuration with the specified menu and preview.

```
@MainActor @preconcurrency convenience init(preview: UITextItem.MenuConfiguration.Preview? = .default, menu: UIMenu)
```

## Parameters

`preview`

The preview to display alongside the menu.

`menu`

The menu to present when the user interacts with the text item.

---

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)