BottomSheet

fun BottomSheet(onDismissRequest: () -> Unit, modifier: Modifier = Modifier, sheetState: SheetState = rememberModalBottomSheetState(), dragHandle: @Composable () -> Unit? = { DragHandle() }, applyTempStatusBarPadding: Boolean = false, content: @Composable ColumnScope.() -> Unit)

Modal bottom sheets are used as an alternative to inline menus or simple dialogs on mobile, especially when offering a long list of action items, or when items require longer descriptions and icons. Like dialogs, modal bottom sheets appear in front of app content, disabling all other app functionality when they appear, and remaining on screen until confirmed, dismissed, or a required action has been taken.

Parameters

onDismissRequest
modifier

Optional Modifier for the bottom sheet.

showHandle

Optional Boolean to show / hide handle, if handle is hidden it will fill all screen.

contentTopPadding

The top padding for the content of the bottom sheet, does not apply to the handle.

By default if showHandle is Boolean.true. contentTopPadding = SheetDefaults.ContentTopPadding else contentTopPadding = SheetDefaults.ContentTopPaddingNoHandle

If you want to have immersive BottomSheet, you can set contentTopPadding = 0.dp, Beware you need to set your content top padding yourself to avoid content to be hidden by the handle at least SheetDefaults.ContentTopPadding

sheetState

the state of the bottom sheet.

content

The content to be displayed inside the bottom sheet.