Modal

Example

Code

Razor (cshtml, Razor)
<button class="btn btn-primary" @onclick="() => modal.Show()">Show modal</button>
<Modal Title="Modal test" @ref="modal" OkButtonText="OK" ShowCancelButton="false" onOkClick="OkClick">
    <h2>Modal content goes here!</h2>
    <p>This can also be binded to properties.</p>
    <p>@content</p>
</Modal>
C#
private string content { get; set; } = "Test content from bind!";
private Modal modal { get; set; }

private void OkClick()
{
    modal.Hide();
}
An unhandled error has occurred. Reload 🗙