---
title: "rememberPickerState"
description: "Creates a [PickerState] that is remembered across compositions."
type: "composable"
---

<div class='type'>Composable Function</div>


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

<div class='sourceset sourceset-android'>Android</div>


```kotlin
@Composable
public fun rememberPickerState(
    @IntRange(from = 1) initialNumberOfOptions: Int,
    @IntRange(from = 0) initiallySelectedIndex: Int = 0,
    shouldRepeatOptions: Boolean = true,
): PickerState
```


Creates a `PickerState` that is remembered across compositions.

#### Parameters

| | |
| --- | --- |
| initialNumberOfOptions | the number of options. |
| initiallySelectedIndex | the index of the option to show in the center at the start, zero-based. |
| shouldRepeatOptions | if true (the default), the options will be repeated. |





