DhDialog
Modal alert dialog. Confirm-only, two-button, with checkbox, or with a loading progress bar — wraps Material 3 AlertDialog with DhButton actions.
Confirm-only
Single OK button — error surfaces, one-way acknowledgements.


DhDialog(
onDismissRequest = { show = false },
title = "Something went wrong",
text = "Please check your connection and try again.",
confirmLabel = "OK",
onConfirm = { show = false }
)Two-button
Most common pattern: confirm + dismiss.


DhDialog(
onDismissRequest = { show = false },
title = "Delete task?",
text = "This cannot be undone.",
confirmLabel = "Delete",
onConfirm = { delete(); show = false },
dismissLabel = "Cancel",
onDismiss = { show = false }
)With checkbox
Add "Don't ask again" style confirmations.


DhDialog(
onDismissRequest = { show = false },
title = "Leave offline mode?",
text = "Recordings made while offline will sync when you reconnect.",
confirmLabel = "Go online",
onConfirm = { goOnline(); show = false },
dismissLabel = "Stay offline",
onDismiss = { show = false },
checkboxLabel = "Don't ask again",
checkboxChecked = skip,
onCheckboxChange = { skip = it }
)Loading
Async confirm action — actions disabled, progress bar appears.


DhDialog(
onDismissRequest = { /* block while loading */ },
title = "Uploading…",
text = "3 of 12 files uploaded.",
confirmLabel = "Cancel",
onConfirm = { cancel() },
loading = true
)With icon
Hero icon above the title for extra context.


DhDialog(
onDismissRequest = {},
title = "Permission required",
text = "Justin needs camera access to record video.",
confirmLabel = "Open settings",
onConfirm = { openSettings() },
dismissLabel = "Not now",
onDismiss = { dismiss() },
icon = { Icon(painterResource(Res.drawable.ic_danger), null) }
)