# rememberBottomSheetState

Common/AllAndroid/JVM

## Functions summary

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/material/BottomSheetState` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/material/rememberBottomSheetState.composable#rememberBottomSheetState(androidx.compose.material.BottomSheetValue,androidx.compose.animation.core.AnimationSpec,kotlin.Function1)( initialValue: https://developer.android.com/reference/kotlin/androidx/compose/material/BottomSheetValue, animationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>, confirmStateChange: (https://developer.android.com/reference/kotlin/androidx/compose/material/BottomSheetValue) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` Create a `https://developer.android.com/reference/kotlin/androidx/compose/material/BottomSheetState` and `https://developer.android.com/reference/kotlin/androidx/compose/runtime/remember.composable#remember(kotlin.Function0)` it. | Cmn |

## Functions

### rememberBottomSheetState

Cmn Artifact: [androidx.compose.material:material](https://developer.android.com/jetpack/androidx/releases/compose-material) [View Source](https://cs.android.com/search?q=file:androidx/compose/material/BottomSheetScaffold.kt+function:rememberBottomSheetState) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0)

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

Create a `https://developer.android.com/reference/kotlin/androidx/compose/material/BottomSheetState` and `https://developer.android.com/reference/kotlin/androidx/compose/runtime/remember.composable#remember(kotlin.Function0)` it.

| Parameters |
|---|---|
| `initialValue: https://developer.android.com/reference/kotlin/androidx/compose/material/BottomSheetValue` | The initial value of the state. |
| `animationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html> = BottomSheetScaffoldDefaults.AnimationSpec` | The default animation that will be used to animate to a new state. |
| `confirmStateChange: (https://developer.android.com/reference/kotlin/androidx/compose/material/BottomSheetValue) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = { true }` | Optional callback invoked to confirm or veto a pending state change. |