Composable Function

rememberBottomSheetState

Create and remember a SheetState for BottomSheet, ModalBottomSheet, or BottomSheetScaffold.

rememberBottomSheetState

Source set: Common
@Composable
public fun rememberBottomSheetState(
    initialValue: SheetValue,
    enabledValues: Set<SheetValue> = setOf(Hidden, PartiallyExpanded, Expanded),
    confirmValueChange: (SheetValue) -> Boolean = { true },
): SheetState

Create and remember a SheetState for BottomSheet, ModalBottomSheet, or BottomSheetScaffold.

Parameters

initialValue The initial value of the state.
enabledValues The set of SheetValues that the bottom sheet can settle in. This is the direct source of truth for available states; if a value is included here, the component will attempt to create an anchor for it.
confirmValueChange Optional callback invoked to confirm or veto a pending state change.
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: