# SelectionMenuComponent

Artifact: [androidx.pdf:pdf-viewer](https://developer.android.com/jetpack/androidx/releases/pdf) [View Source](https://cs.android.com/search?q=file:androidx/pdf/selection/ViewerSelectionMenuComponent.kt+class:androidx.pdf.selection.SelectionMenuComponent) Added in [1.0.0-beta01](https://developer.android.com/jetpack/androidx/releases/pdf#1.0.0-beta01)

*** ** * ** ***


```
class SelectionMenuComponent : ContextMenuComponent
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.pdf.selection.ContextMenuComponent](https://developer.android.com/reference/kotlin/androidx/pdf/selection/ContextMenuComponent) ||
|   | ↳ | [androidx.pdf.selection.SelectionMenuComponent](https://developer.android.com/reference/kotlin/androidx/pdf/selection/SelectionMenuComponent) |

*** ** * ** ***

Represents a clickable item with a label in a selection menu.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/pdf/selection/SelectionMenuComponent#SelectionMenuComponent(kotlin.Any,kotlin.String,kotlin.String,kotlin.Function1)( key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html, label: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, contentDescription: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, onClick: https://developer.android.com/reference/kotlin/androidx/pdf/selection/SelectionMenuSession.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/pdf/selection/SelectionMenuComponent#contentDescription()` An optional accessibility description for screen readers. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/pdf/selection/SelectionMenuComponent#label()` The text to display for this menu item. |
| `https://developer.android.com/reference/kotlin/androidx/pdf/selection/SelectionMenuSession.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/pdf/selection/SelectionMenuComponent#onClick()` A lambda function invoked when the item is clicked, providing access to the `https://developer.android.com/reference/kotlin/androidx/pdf/selection/SelectionMenuSession`. |

### Inherited properties

From [androidx.pdf.selection.ContextMenuComponent](https://developer.android.com/reference/kotlin/androidx/pdf/selection/ContextMenuComponent) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html` `https://developer.android.com/reference/kotlin/androidx/pdf/selection/ContextMenuComponent#key()`

A unique identifier for this component within its context menu.

## Public constructors

### SelectionMenuComponent

Added in [1.0.0-beta01](https://developer.android.com/jetpack/androidx/releases/pdf#1.0.0-beta01)

```
SelectionMenuComponent(
    key: Any,
    label: String,
    contentDescription: String?,
    onClick: SelectionMenuSession.() -> Unit
)
```

| Parameters |
|---|---|
| `key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html` | A unique identifier for this component. |
| `label: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The text to display for this menu item. |
| `contentDescription: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | An optional accessibility description for screen readers. |
| `onClick: https://developer.android.com/reference/kotlin/androidx/pdf/selection/SelectionMenuSession.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | A lambda function invoked when the item is clicked, providing access to the `https://developer.android.com/reference/kotlin/androidx/pdf/selection/SelectionMenuSession`. |

## Public properties

### contentDescription

Added in [1.0.0-beta01](https://developer.android.com/jetpack/androidx/releases/pdf#1.0.0-beta01)

```
val contentDescription: String?
```

An optional accessibility description for screen readers.

### label

Added in [1.0.0-beta01](https://developer.android.com/jetpack/androidx/releases/pdf#1.0.0-beta01)

```
val label: String
```

The text to display for this menu item.

### onClick

Added in [1.0.0-beta01](https://developer.android.com/jetpack/androidx/releases/pdf#1.0.0-beta01)

```
val onClick: SelectionMenuSession.() -> Unit
```

A lambda function invoked when the item is clicked, providing access to the `https://developer.android.com/reference/kotlin/androidx/pdf/selection/SelectionMenuSession`.