---
title: "rememberBottomSheetState"
description: "Create a [BottomSheetState] and [remember] it."
type: "composable"
---

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


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

<div class='sourceset sourceset-common'>Common</div>


```kotlin
@Composable
fun rememberBottomSheetState(
    initialValue: BottomSheetValue,
    animationSpec: AnimationSpec<Float> = BottomSheetScaffoldDefaults.AnimationSpec,
    confirmStateChange: (BottomSheetValue) -> Boolean = { true },
): BottomSheetState
```


Create a `BottomSheetState` and `remember` it.

#### Parameters

| | |
| --- | --- |
| initialValue | The initial value of the state. |
| animationSpec | The default animation that will be used to animate to a new state. |
| confirmStateChange | Optional callback invoked to confirm or veto a pending state change. |





