BlazorUI Demo

Dialog and dialog host

Typed results, confirmation helpers, message boxes and custom dialog components from one application host.

Confirmation
Result: Not opened
View code
<BuiButton OnClick="Confirm" Color="Colors.Warning">Delete record</BuiButton>
<BuiText Typo="Typo.Caption">Result: @result</BuiText>

@code {
    private string result = "Not opened";
    private async Task Confirm() => result = await Dialogs.ShowConfirmation("Delete this record?", new() { Title = "Confirm deletion" }) ? "Confirmed" : "Cancelled";
}
Message box
View code
<BuiButton OnClick="ShowMessage">Show message</BuiButton>

@code {
    private async Task ShowMessage() => await Dialogs.ShowMessageBox("Operation complete", @<BuiText>Your changes were saved.</BuiText>);
}