# PickerGroupItem

Artifact: [androidx.wear.compose:compose-material](https://developer.android.com/jetpack/androidx/releases/wear-compose) [View Source](https://cs.android.com/search?q=file:androidx/wear/compose/material/PickerGroup.kt+class:androidx.wear.compose.material.PickerGroupItem) Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.2.0)

<br />

```
class PickerGroupItem
```

<br />

*** ** * ** ***

A class for representing `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/Picker.composable#Picker(androidx.wear.compose.material.PickerState,kotlin.String,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.Function1,kotlin.Function0,androidx.wear.compose.foundation.lazy.ScalingParams,androidx.compose.ui.unit.Dp,kotlin.Float,androidx.compose.ui.graphics.Color,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean,androidx.wear.compose.foundation.rotary.RotaryScrollableBehavior,kotlin.Function2)` which will be composed inside a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PickerGroup.composable#PickerGroup(kotlin.Array,androidx.compose.ui.Modifier,androidx.wear.compose.material.PickerGroupState,kotlin.Function1,kotlin.Boolean,kotlin.Boolean,androidx.wear.compose.material.TouchExplorationStateProvider,kotlin.Function1)`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PickerGroupItem#PickerGroupItem(androidx.wear.compose.material.PickerState,androidx.compose.ui.Modifier,kotlin.String,androidx.compose.ui.focus.FocusRequester,kotlin.Function0,kotlin.Function1,kotlin.Function3)( pickerState: https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PickerState, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier, contentDescription: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, focusRequester: https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/FocusRequester?, onSelected: () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html, readOnlyLabel: (@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/BoxScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)?, option: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PickerScope.(optionIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, pickerSelected: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) -> 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/wear/compose/material/PickerGroupItem#contentDescription()` Text used by accessibility services to describe what the selected option represents. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/FocusRequester?` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PickerGroupItem#focusRequester()` Optional `https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/FocusRequester` for the `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/Picker.composable#Picker(androidx.wear.compose.material.PickerState,kotlin.String,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.Function1,kotlin.Function0,androidx.wear.compose.foundation.lazy.ScalingParams,androidx.compose.ui.unit.Dp,kotlin.Float,androidx.compose.ui.graphics.Color,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean,androidx.wear.compose.foundation.rotary.RotaryScrollableBehavior,kotlin.Function2)`. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PickerGroupItem#modifier()` Modifier to be applied to the Picker |
| `() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PickerGroupItem#onSelected()` Action triggered when the Picker is selected by clicking |
| `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PickerScope.(optionIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, pickerSelected: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PickerGroupItem#option()` A block which describes the content. |
| `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PickerState` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PickerGroupItem#pickerState()` The state of the picker |
| `(@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/BoxScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)?` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PickerGroupItem#readOnlyLabel()` A slot for providing a label, displayed above the selected option when the `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/Picker.composable#Picker(androidx.wear.compose.material.PickerState,kotlin.String,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.Function1,kotlin.Function0,androidx.wear.compose.foundation.lazy.ScalingParams,androidx.compose.ui.unit.Dp,kotlin.Float,androidx.compose.ui.graphics.Color,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean,androidx.wear.compose.foundation.rotary.RotaryScrollableBehavior,kotlin.Function2)` is read-only. |

## Public constructors

### PickerGroupItem

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.2.0)

```
PickerGroupItem(
    pickerState: PickerState,
    modifier: Modifier = Modifier,
    contentDescription: String? = null,
    focusRequester: FocusRequester? = null,
    onSelected: () -> Unit = {},
    readOnlyLabel: (@Composable BoxScope.() -> Unit)? = null,
    option: @Composable PickerScope.(optionIndex: Int, pickerSelected: Boolean) -> Unit
)
```

| Parameters |
|---|---|
| `pickerState: https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PickerState` | The state of the picker |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | Modifier to be applied to the Picker |
| `contentDescription: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html? = null` | Text used by accessibility services to describe what the selected option represents. This text should be localized, such as by using `https://developer.android.com/reference/kotlin/androidx/compose/ui/res/stringResource.composable#stringResource(kotlin.Int)` or similar. Typically, the content description is inferred via derivedStateOf to avoid unnecessary recompositions, like this: val description by remember { derivedStateOf { /\* expression using state.selectedOption \*/ } } |
| `focusRequester: https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/FocusRequester? = null` | Optional `https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/FocusRequester` for the `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/Picker.composable#Picker(androidx.wear.compose.material.PickerState,kotlin.String,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.Function1,kotlin.Function0,androidx.wear.compose.foundation.lazy.ScalingParams,androidx.compose.ui.unit.Dp,kotlin.Float,androidx.compose.ui.graphics.Color,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean,androidx.wear.compose.foundation.rotary.RotaryScrollableBehavior,kotlin.Function2)`. If not provided, a local instance of `https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/FocusRequester` will be created to handle the focus between different pickers |
| `onSelected: () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html = {}` | Action triggered when the Picker is selected by clicking |
| `readOnlyLabel: (@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/BoxScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)? = null` | A slot for providing a label, displayed above the selected option when the `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/Picker.composable#Picker(androidx.wear.compose.material.PickerState,kotlin.String,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.Function1,kotlin.Function0,androidx.wear.compose.foundation.lazy.ScalingParams,androidx.compose.ui.unit.Dp,kotlin.Float,androidx.compose.ui.graphics.Color,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean,androidx.wear.compose.foundation.rotary.RotaryScrollableBehavior,kotlin.Function2)` is read-only. The label is overlaid with the currently selected option within a Box, so it is recommended that the label is given `https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment#TopCenter()`. |
| `option: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/wear/compose/material/PickerScope.(optionIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, pickerSelected: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | A block which describes the content. The integer parameter to the composable denotes the index of the option and boolean denotes whether the picker is selected or not. |

## Public properties

### contentDescription

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.2.0)

```
val contentDescription: String?
```

Text used by accessibility services to describe what the selected option represents. This text should be localized, such as by using `https://developer.android.com/reference/kotlin/androidx/compose/ui/res/stringResource.composable#stringResource(kotlin.Int)` or similar. Typically, the content description is inferred via derivedStateOf to avoid unnecessary recompositions, like this: val description by remember { derivedStateOf { /\* expression using state.selectedOption \*/ } }

### focusRequester

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.2.0)

```
val focusRequester: FocusRequester?
```

Optional `https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/FocusRequester` for the `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/Picker.composable#Picker(androidx.wear.compose.material.PickerState,kotlin.String,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.Function1,kotlin.Function0,androidx.wear.compose.foundation.lazy.ScalingParams,androidx.compose.ui.unit.Dp,kotlin.Float,androidx.compose.ui.graphics.Color,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean,androidx.wear.compose.foundation.rotary.RotaryScrollableBehavior,kotlin.Function2)`. If not provided, a local instance of `https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/FocusRequester` will be created to handle the focus between different pickers

### modifier

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.2.0)

```
val modifier: Modifier
```

Modifier to be applied to the Picker

### onSelected

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.2.0)

```
val onSelected: () -> Unit
```

Action triggered when the Picker is selected by clicking

### option

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.2.0)

```
val option: @Composable PickerScope.(optionIndex: Int, pickerSelected: Boolean) -> Unit
```

A block which describes the content. The integer parameter to the composable denotes the index of the option and boolean denotes whether the picker is selected or not.

### pickerState

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.2.0)

```
val pickerState: PickerState
```

The state of the picker

### readOnlyLabel

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.2.0)

```
val readOnlyLabel: (@Composable BoxScope.() -> Unit)?
```

A slot for providing a label, displayed above the selected option when the `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/Picker.composable#Picker(androidx.wear.compose.material.PickerState,kotlin.String,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.Function1,kotlin.Function0,androidx.wear.compose.foundation.lazy.ScalingParams,androidx.compose.ui.unit.Dp,kotlin.Float,androidx.compose.ui.graphics.Color,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean,androidx.wear.compose.foundation.rotary.RotaryScrollableBehavior,kotlin.Function2)` is read-only. The label is overlaid with the currently selected option within a Box, so it is recommended that the label is given `https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment#TopCenter()`.