---
title: UITextItem.MenuConfiguration
framework: uikit
role: symbol
role_heading: Class
path: uikit/uitextitem/menuconfiguration
---

# UITextItem.MenuConfiguration

An object that describes what type of menu and preview to show for a text item.

## Declaration

```swift
@MainActor class MenuConfiguration
```

## Overview

Overview Create and return a menu configuration for a text item in textView(_:menuConfigurationFor:defaultMenu:) to provide a custom menu that the system shows when someone interacts with the text item. Provide a custom view for the item’s preview, or specify that the system displays a default preview.

## Topics

### Creating a menu configuration

- [init(preview:menu:)](uikit/uitextitem/menuconfiguration/init(preview:menu:).md)
- [UITextItem.MenuConfiguration.Preview](uikit/uitextitem/menuconfiguration/preview.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)

## See Also

### Text actions and menus

- [UITextItem](uikit/uitextitem.md)
- [UITextViewDelegate](uikit/uitextviewdelegate.md)
