← Compose Multiplatform Component in Compose Foundation
ContextMenuArea
Desktop
Defines a container where context menu is available. Menu is triggered by right mouse clicks. Representation of menu is defined by [LocalContextMenuRepresentation]`
Last updated:
Installation
dependencies {
implementation("androidx.compose.foundation:foundation:1.7.0-beta04")
}
Overloads
@Composable
fun ContextMenuArea(
items: () -> List<ContextMenuItem>,
state: ContextMenuState = remember { ContextMenuState() },
enabled: Boolean = true,
content: @Composable () -> Unit
)
Parameters
name | description |
---|---|
items | List of context menu items. Final context menu contains all items from descendant [ContextMenuArea] and [ContextMenuDataProvider]. |
state | [ContextMenuState] of menu controlled by this area. |
enabled | If false then gesture detector is disabled. |
content | The content of the [ContextMenuArea]. |