OverlayBottomSheet

fun OverlayBottomSheet(show: Boolean, modifier: Modifier = Modifier, title: String? = null, startAction: @Composable () -> Unit? = null, endAction: @Composable () -> Unit? = null, backgroundColor: Color = BottomSheetDefaults.backgroundColor(), enableWindowDim: Boolean = true, cornerRadius: Dp = BottomSheetDefaults.cornerRadius, sheetMaxWidth: Dp = BottomSheetDefaults.maxWidth, onDismissRequest: () -> Unit? = null, onDismissFinished: () -> Unit? = null, outsideMargin: DpSize = BottomSheetDefaults.outsideMargin, insideMargin: DpSize = BottomSheetDefaults.insideMargin, defaultWindowInsetsPadding: Boolean = true, dragHandleColor: Color = BottomSheetDefaults.dragHandleColor(), allowDismiss: Boolean = true, enableNestedScroll: Boolean = true, renderInRootScaffold: Boolean = true, content: @Composable () -> Unit)

A bottom sheet that slides up from the bottom of the screen. The height adapts to the content size, but will not cover the status bar area.

Parameters

show

Whether the OverlayBottomSheet is shown.

modifier

The modifier to be applied to the OverlayBottomSheet.

title

Optional title to display at the top of the OverlayBottomSheet.

startAction

Optional Composable to display on the start side of the title (e.g. a close button).

endAction

Optional Composable to display on the end side of the title (e.g. a submit button).

backgroundColor

The background color of the OverlayBottomSheet.

enableWindowDim

Whether to dim the window behind the OverlayBottomSheet.

cornerRadius

The corner radius of the top corners of the OverlayBottomSheet.

sheetMaxWidth

The maximum width of the OverlayBottomSheet.

onDismissRequest

Will called when the user tries to dismiss the Dialog by clicking outside or pressing the back button.

onDismissFinished

The callback when the OverlayBottomSheet is completely dismissed.

outsideMargin

The margin outside the OverlayBottomSheet.

insideMargin

The margin inside the OverlayBottomSheet.

defaultWindowInsetsPadding

Whether to apply default window insets padding.

dragHandleColor

The color of the drag handle at the top.

allowDismiss

Whether to allow dismissing the sheet via drag or back gesture.

enableNestedScroll

Whether to enable nested scrolling for the content.

renderInRootScaffold

Whether to render the bottom sheet in the root (outermost) Scaffold. When true (default), the bottom sheet covers the full screen. When false, it renders within the current Scaffold's bounds.

content

The Composable content of the OverlayBottomSheet.