Skip to content

AlertDialog

@Composable



fun ModalScope.AlertDialog(
    title: Component, 
    message: Component, 
    confirmText: Component = Component.literal("OK"), 
    onConfirm: () -> Unit = {}
)

Simple one-action modal for acknowledgements and warnings.

Parameters

  • title: The dialog's header text.

  • message: The body text explaining the alert.

  • confirmText: Label for the single dismiss button.

  • onConfirm: Called just before the modal dismisses itself.