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
visible | A boolean value that determines whether the dialog should be displayed. |
onDismissRequest | A 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. |
modifier | Modifier to be applied to the dialog content. |
properties | An optional DialogProperties object for configuring the dialog's behavior. |
content | A composable function that defines the content of the dialog. |
Create your own Component Library
Material Components are meant to be used as is and they do not allow customizations. To build your own Jetpack Compose component library use Compose Unstyled