---
title: "TextContextMenuProvider"
description: "The provider determines how the context menu is shown and its appearance.

The context menu can be customized by providing another implementation of this to
[LocalTextContextMenuDropdownProvider] or [LocalTextContextMenuToolbarProvider] via a
[CompositionLocalProvider].

If you want to modify the contents of the context menu, see
[Modifier.appendTextContextMenuComponents][appendTextContextMenuComponents] and
[Modifier.filterTextContextMenuComponents][filterTextContextMenuComponents]"
type: "interface"
---

<div class='type'>Interface</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>



```kotlin
interface TextContextMenuProvider
```


The provider determines how the context menu is shown and its appearance.

The context menu can be customized by providing another implementation of this to
`LocalTextContextMenuDropdownProvider` or `LocalTextContextMenuToolbarProvider` via a
`CompositionLocalProvider`.

If you want to modify the contents of the context menu, see
`Modifier.appendTextContextMenuComponents` and
`Modifier.filterTextContextMenuComponents`


## Functions

```kotlin
suspend fun showTextContextMenu(dataProvider: TextContextMenuDataProvider)
```


Shows the text context menu.

This function suspends until the context menu is closed. If the coroutine is cancelled, the
context menu will be closed.

#### Parameters

| | |
| --- | --- |
| dataProvider | provides the data necessary to show the text context menu. |




