Skip to content
daisyBlazor

ConfirmDialog

A ready-made confirm or cancel dialog, opened with IDialogService.ShowAsync. Set the body text, the confirm label and its colour; the result is cancelled unless the user confirms.
Feedback.modal
Cover · <ConfirmDialog>

Delete “Website redesign”?

The project and its 24 tasks will be gone for good.

Examples

Destructive action

Color.Error marks a confirm button that can't be undone.

“Website redesign” · 24 tasks
website/Examples/Feedback/ConfirmDialogDestructiveExample.razor Source

Your own labels

ButtonText and CancelText take localized strings.

Brouillon
website/Examples/Feedback/ConfirmDialogLabelsExample.razor Source

API

<ConfirmDialog>

DaisyBlazor.Feedback

Standard confirm/cancel dialog. Pass CancelText for a localized cancel label.

Parameters

  • ButtonText string
    = "Confirm"

    Label of the confirm button. Defaults to "Confirm"; pass a localized string to override.

  • CancelText string
    = null

    Label of the cancel button. Defaults to "Cancel"; pass a localized string to override.

  • Color Color
    = Color.Primary

    Color applied to the confirm button.

  • ContentText string
    = ""

    Body text shown inside the dialog.

Something went wrong while running the docs. Reload