Material3AlertDialogContent

fun Material3AlertDialogContent(modifier: Modifier = Modifier, title: @Composable BoxScope.() -> Unit? = null, text: @Composable BoxScope.() -> Unit? = null, confirmButton: @Composable () -> Unit, dismissButton: @Composable () -> Unit? = null, shape: Shape = AlertDialogDefaults.shape, containerColor: Color = AlertDialogDefaults.containerColor, titleContentColor: Color = AlertDialogDefaults.titleContentColor, textContentColor: Color = AlertDialogDefaults.textContentColor, tonalElevation: Dp = AlertDialogDefaults.TonalElevation)

Material Design basic dialog content

This composable provides the content layout for a Material3 alert dialog without creating the actual dialog itself. It's useful when you want to customize how the dialog is shown or integrate it with different dialog containers.

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

Parameters

modifier

the Modifier to be applied to this dialog content surface

title

optional composable that displays the title of the dialog

text

optional composable that displays the main text content of the dialog

confirmButton

button which is meant to confirm a proposed action. The dialog does not set up any events for this button so they need to be set up by the caller.

dismissButton

optional button which is meant to dismiss the dialog. The dialog does not set up any events for this button so they need to be set up by the caller.

shape

defines the shape of this dialog's container surface

containerColor

the color used for the background of this dialog surface

titleContentColor

the content color used for the title

textContentColor

the content color used for the text

tonalElevation

when containerColor is ColorScheme.surface, a translucent primary color overlay is applied on top of the container. A higher tonal elevation value will result in a darker color in light theme and lighter color in dark theme.