androidx.compose.material3
rememberBottomSheetStateSince 1.12Experimental
Function
No hand-written docs yet.
Create and remember a SheetState for BottomSheet, ModalBottomSheet, or BottomSheetScaffold.
ParametersExperimental
@Composable
fun rememberBottomSheetState(
initialValue: SheetValue,
enabledValues: Set<SheetValue> = setOf(Hidden, PartiallyExpanded, Expanded),
confirmValueChange: (SheetValue) -> Boolean = { true },
): SheetState
initialValue: SheetValueRequired
initialValue: SheetValueRequiredThe initial value of the state.
enabledValues: Set<SheetValue>Optional
enabledValues: Set<SheetValue>OptionalDefault: setOf(Hidden, PartiallyExpanded, Expanded)
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: (SheetValue) -> BooleanOptional
confirmValueChange: (SheetValue) -> BooleanOptionalDefault: { true }
Optional callback invoked to confirm or veto a pending state change.
Library docs
Create and remember a SheetState for BottomSheet, ModalBottomSheet, or
BottomSheetScaffold.