<div class='type'>Compose Modifier</div>

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


<h2 id="appendtextcontextmenucomponents-builder">appendTextContextMenuComponents</h2>

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


```kotlin
fun Modifier.appendTextContextMenuComponents(
    builder: TextContextMenuBuilderScope.() -> Unit
): Modifier
```


Adds a `builder` to be run when the text context menu is shown within this hierarchy.

When there are multiple instances of this modifier in a layout hierarchy, the `builder`s are
applied in order from bottom to top. They are then filtered by every
`Modifier.filterTextContextMenuComponents` in the hierarchy.

#### Parameters

| | |
| --- | --- |
| builder | a snapshot-aware builder function for adding components to the context menu. In this function you can use member functions from the receiver `TextContextMenuBuilderScope`, such as `separator()`, to add components. The `item` function is not in the common source set, but is instead defined as an extension function in the platform specific source sets. |