WindowBottomSheet

fun WindowBottomSheet(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, content: @Composable () -> Unit)

A bottom sheet that slides up from the bottom of the screen, rendered at window level without Scaffold.

Use LocalDismissState inside content to request dismissal from inner composables.

Parameters

show

Whether the WindowBottomSheet is shown.

modifier

The modifier to be applied to the WindowBottomSheet.

title

Optional title to display at the top of the WindowBottomSheet.

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 WindowBottomSheet.

enableWindowDim

Whether to dim the window behind the WindowBottomSheet.

cornerRadius

The corner radius of the top corners of the WindowBottomSheet.

sheetMaxWidth

The maximum width of the WindowBottomSheet.

onDismissRequest

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

onDismissFinished

The callback when the WindowBottomSheet is completely dismissed.

outsideMargin

The margin outside the WindowBottomSheet.

insideMargin

The margin inside the WindowBottomSheet.

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.

content

The Composable content of the WindowBottomSheet.