Dialog

Composable Component

A base dialog component used by AlertDialog and ConfirmationDialog variations. This dialog provides a full-screen experience with custom entry/exit animations.

Android
@Composable
public fun Dialog(
    visible: Boolean,
    onDismissRequest: () -> Unit,
    modifier: Modifier = Modifier,
    properties: DialogProperties = DialogProperties(),
    content: @Composable () -> Unit,
)

Parameters

visibleA boolean value that determines whether the dialog should be displayed.
onDismissRequestA lambda function to be called when the dialog is dismissed by swiping right. Implementation of this lambda must remove the dialog from the composition hierarchy e.g. by setting visible to false.
modifierModifier to be applied to the dialog content.
propertiesAn optional DialogProperties object for configuring the dialog's behavior.
contentA composable function that defines the content of the dialog.