OverlayDialog

fun OverlayDialog(show: Boolean, modifier: Modifier = Modifier, title: String? = null, titleColor: Color = DialogDefaults.titleColor(), summary: String? = null, summaryColor: Color = DialogDefaults.summaryColor(), backgroundColor: Color = DialogDefaults.backgroundColor(), enableWindowDim: Boolean = true, onDismissRequest: () -> Unit? = null, onDismissFinished: () -> Unit? = null, outsideMargin: DpSize = DialogDefaults.outsideMargin, insideMargin: DpSize = DialogDefaults.insideMargin, defaultWindowInsetsPadding: Boolean = true, renderInRootScaffold: Boolean = true, maxWidth: Dp = DialogDefaults.MaxWidth, largeScreen: Boolean? = null, cornerRadius: Dp? = null, content: @Composable () -> Unit)

A dialog with a title, a summary, and other contents.

Parameters

show

Whether the OverlayDialog is shown.

modifier

The modifier to be applied to the OverlayDialog.

title

The title of the OverlayDialog.

titleColor

The color of the title.

summary

The summary of the OverlayDialog.

summaryColor

The color of the summary.

backgroundColor

The background color of the OverlayDialog.

enableWindowDim

Whether to enable window dimming when the OverlayDialog is shown.

onDismissRequest

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

onDismissFinished

The callback when the OverlayDialog is completely dismissed.

outsideMargin

The margin outside the OverlayDialog.

insideMargin

The margin for the built-in texts: width is the horizontal padding of the title and summary, height is the top padding above the title. The content slot is left unpadded so COUI-style button bars can span the full panel width.

defaultWindowInsetsPadding

Whether to apply default window insets padding to the OverlayDialog.

renderInRootScaffold

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

maxWidth

The maximum width of the OverlayDialog.

largeScreen

Optional override for the large-screen presentation (centered scale/fade instead of bottom slide-in). If null, detected from the window size.

cornerRadius

Optional corner radius override. If null, DialogDefaults.CornerRadius is used.

content

The Composable content of the OverlayDialog.