# TextContextMenuComponent

Artifact: [androidx.compose.foundation:foundation](https://developer.android.com/jetpack/androidx/releases/compose-foundation) [View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/text/contextmenu/data/TextContextMenuData.kt+class:androidx.compose.foundation.text.contextmenu.data.TextContextMenuComponent) Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.9.0) Common/AllAndroid/JVM
- Cmn

  ```
  abstract class TextContextMenuComponent
  ```
Known direct subclasses [TextContextMenuItem](https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/contextmenu/data/TextContextMenuItem), [TextContextMenuSeparator](https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/contextmenu/data/TextContextMenuSeparator)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/contextmenu/data/TextContextMenuItem` | A `https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/contextmenu/data/TextContextMenuComponent` that represents a clickable item with a label in a context menu. |
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/contextmenu/data/TextContextMenuSeparator` | A `https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/contextmenu/data/TextContextMenuComponent` separator in a text context menu. |

*** ** * ** ***

A single component of a text context menu.

## Summary

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/contextmenu/data/TextContextMenuComponent#key()` A unique key that identifies this component, mainly for use in filtering a component in `https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/contextmenu/modifier/filterTextContextMenuComponents.modifier#(androidx.compose.ui.Modifier).filterTextContextMenuComponents(kotlin.Function1)`. | Cmn |

## Public properties

### key

Cmn Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.9.0)

```
val key: Any
```

A unique key that identifies this component, mainly for use in filtering a component in `https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/contextmenu/modifier/filterTextContextMenuComponents.modifier#(androidx.compose.ui.Modifier).filterTextContextMenuComponents(kotlin.Function1)`. It is advisable to use a `data object` as a key here.