Build apps faster with over 150+ styled components and screens! Check it out →

Dialog

Android

Component in Wear Material 3 Compose

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

Dialogs provide important prompts in a user flow. They can require an action, communicate information, or help users accomplish a task.

The caller should consider whether timeText or scrollIndicator are needed on this dialog, in this case they should provide that in their content by using ScreenScaffold (with suitable scrollState if that's required).

Last updated:

Installation

dependencies {
   implementation("androidx.wear.compose:compose-material3:1.0.0-alpha32")
}

Overloads

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

Parameters

namedescription
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.
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.
by @alexstyl