Components

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.

Light dh-dialog confirm, only (light theme)
Dark dh-dialog confirm, only (dark theme)
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.

Light dh-dialog two, button (light theme)
Dark dh-dialog two, button (dark theme)
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.

Light dh-dialog with, checkbox (light theme)
Dark dh-dialog with, checkbox (dark theme)
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.

Light dh-dialog loading (light theme)
Dark dh-dialog loading (dark theme)
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.

Light dh-dialog with, icon (light theme)
Dark dh-dialog with, icon (dark theme)
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) }
)