SkillAgentSearch skills...

BlazorDialog

Easy dialog management for Blazor !

Install / Use

/learn @stavroskasidis/BlazorDialog
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Blazor Dialog

Build status Nuget (with prereleases) Nuget Donate

Dialog component as a service for Blazor!

demo-img

Features

  • Call a dialog procedurally as a service and await for the result !
  • Open any component as a dialog.
  • Can use dialogs as normal components, declaratively (if you don't want to use as a service).
  • Build-in modal dialog with optional helper components (Header, Body, Footer).
  • Option to use completely custom markup/css, ignoring the build-in opinionated css and html.

Samples / Demo

You can find code samples and demos here.

Installation

1. Add the nuget package in your Blazor project

> dotnet add package BlazorDialog

OR

PM> Install-Package BlazorDialog

Nuget package page can be found here.

2. Add the following line in your Blazor project

- Program.cs

// other code
builder.Services.AddBlazorDialog();
// other code

3. Add the following line in all your _Imports.razor

@using BlazorDialog

4. Add the following line in your MainLayout.razor (or any other central 'interactive' spot)

<DialogOutput/>

5. Reference the css & script files

Add the following static file references in your App.razor file.

<link href="_content/BlazorDialog/styles.min.css" rel="stylesheet" />
<script src="_content/BlazorDialog/blazorDialog.min.js"></script>

⚠️ Breaking changes ⚠️

<details open="open"><summary>Upgrading from 3.2 to 4.0</summary>
  • It is required to add a static file reference to the new javascript file.
</details> <details><summary>Upgrading from 0.3 to 1.0</summary>
  • Removed PreventShow and PreventHide from OnBeforeShow and OnBeforeHide respectively. Too many cases where infinite loops could happen.
</details>

Release Notes

<details open="open"><summary>4.1</summary>
  • Restore PreventHide functionality via OnBeforeHide event.
  • Add two-way binding support to the "IsShowing" parameter to fix issues when using the Dialog component as a normal component in combination with the keyboard close feature and the close button feature.
</details> <details><summary>4.0</summary>
  • A new javascript file is required to be loaded (see breaking changes).
  • New feature: Allow closing the dialog with a key press (escape by default).
</details> <details><summary>3.2</summary>
  • Fix for a bug when the same dialog is presented consecutively, never returning result. Contributed by thanoskapsalis.
</details> <details><summary>3.1</summary>
  • Added ForceAllowNavigation and ForcePreventNavigation methods to the Dialog component to allow/prevent navigation regardless of the PreventNavigation parameter.
</details> <details><summary>3.0</summary>
  • Migrate to .NET 8.0
  • Add PreventNavigation option to prevent navigation when dialog is open.
</details> <details><summary>2.3</summary>
  • Expose dialog options as cascading parameter when using ComponentAsDialog.
</details> <details><summary>2.2</summary>
  • Fix for showing the same dialog with the dialog service more than once in the same async function.
  • Upgrade MS packages dependecy to 6.0.26
</details> <details><summary>2.1</summary>
  • Minor fix for when returning null dialog results to non nullable result types.
</details> <details><summary>2.0</summary>
  • New feature: ShowComponentAsDialog. Check demo app for examples.
  • Upgraded target framework to 6.0
</details> <details><summary>1.6</summary>
  • Added a new size option: ExtraExtraLarge.
</details> <details ><summary>1.5</summary>
  • Added css class parameter to all helper components (header/body/footer).
</details> <details><summary>1.4</summary>
  • Added css class parameter to dialog component.
</details> <details><summary>1.3</summary>
  • Added base z-index parameter to dialog component.
</details> <details><summary>1.2</summary>
  • Added fullscreen mode.
</details> <details ><summary>1.1</summary>
  • Added support for dialog-in-dialog.
</details> <details><summary>1.0</summary>
  • Fixed an infinite loop bug with OnBeforeShow event.
  • Fixed css bugs.
  • Removed PreventShow and PreventHide from OnBeforeShow and OnBeforeHide respectively. Too many cases where infinite loops could happen.
</details> <details><summary>0.3</summary>
  • Upgrated to 3.1.
  • Added new helper components: DialogHeader, DialogBody, DialogFooter
</details> <details><summary>0.1</summary>
  • Initial release.
</details>
View on GitHub
GitHub Stars48
CategoryDevelopment
Updated17d ago
Forks10

Languages

HTML

Security Score

95/100

Audited on Mar 17, 2026

No findings