New Compose Multiplatform components arrived on Composables UICheck it out →

ContextMenuDataProvider

Adds items to the hierarchy of context menu items. Can be used, for example, to customize context menu of text fields.

Last updated:

Installation

dependencies {
   implementation("androidx.compose.foundation:foundation:1.7.0-beta03")
}

Overloads

@Composable
fun ContextMenuDataProvider(
    items: () -> List<ContextMenuItem>,
    content: @Composable () -> Unit
)

Parameters

namedescription
itemsList of context menu items. Final context menu contains all items from descendant [ContextMenuArea] and [ContextMenuDataProvider].
contentThe content of the [ContextMenuDataProvider].