androidx.compose.material3
BottomSheetSince 1.11Experimental
Composable function
One of the bottom sheet types. It works like ModalBottomSheet. Only the parameters that differ are described here.
Only the sheet: no dim layer, no window, no scaffold. Place it yourself in your layout.

Box(Modifier.size(360.dp, 300.dp)) {
BottomSheet(state = rememberBottomSheetState(SheetValue.Expanded)) {
Text("Filters", Modifier.padding(horizontal = 16.dp), style = MaterialTheme.typography.titleMedium)
Spacer(Modifier.height(80.dp))
}
}
ParametersExperimental
@Composable
fun BottomSheet(
modifier: Modifier = Modifier,
state: SheetState = rememberBottomSheetState(initialValue = Hidden),
onDismissRequest: () -> Unit = {},
maxWidth: Dp = BottomSheetDefaults.SheetMaxWidth,
gesturesEnabled: Boolean = true,
backHandlerEnabled: Boolean = true,
dragHandle: @Composable (() -> Unit)? = { BottomSheetDefaults.DragHandle() },
contentWindowInsets: @Composable () -> WindowInsets = { BottomSheetDefaults.standardWindowInsets },
shape: Shape = BottomSheetDefaults.ExpandedShape,
containerColor: Color = BottomSheetDefaults.ContainerColor,
contentColor: Color = contentColorFor(containerColor),
tonalElevation: Dp = BottomSheetDefaults.Elevation,
shadowElevation: Dp = 0.dp,
content: @Composable ColumnScope.() -> Unit,
)
state: SheetStateOptional
state: SheetStateOptionalDefault: rememberBottomSheetState(initialValue = Hidden)
The position of a BottomSheet. Create it with rememberBottomSheetState(...).
maxWidth: DpOptional
maxWidth: DpOptionalDefault: BottomSheetDefaults.SheetMaxWidth
The widest the sheet can be.
gesturesEnabled: BooleanOptional
gesturesEnabled: BooleanOptionalDefault: true
Set to false to stop the user from dragging the sheet.
backHandlerEnabled: BooleanOptional
backHandlerEnabled: BooleanOptionalDefault: true
Set to false so back does not close the sheet.
shadowElevation: DpOptional
shadowElevation: DpOptionalDefault: 0.dp
The size of the shadow above the sheet.
Defaults that differ from ModalBottomSheet:
onDismissRequest={}contentWindowInsets={ BottomSheetDefaults.standardWindowInsets }tonalElevation=BottomSheetDefaults.Elevation
Same as in ModalBottomSheet: modifier, onDismissRequest, dragHandle, contentWindowInsets, shape, containerColor, contentColor, tonalElevation, content.
Bottom sheet types
ModalBottomSheetBottomSheetScaffoldBottomSheet
See also
ModalBottomSheetDefaults: default values and helper functions forBottomSheet.