- bit BlazorUI

ModalService

BitModalService is a service to globally handle modals with any content.

Notes

To use this component, you need to install the `Bit.BlazorUI.Extras` nuget package, as described in the Optional steps of the Getting started page.

Usage

Basic

API

BitModalService parameters
Name
Type
Default value
Description
OnAddModal event Func<BitModalReference, Task>? The event for when a new modal gets added through calling the Show method.
OnCloseModal event Func<BitModalReference, Task>? The event for when a modal gets removed through calling the Close method.
Close void (BitModalReference modal) Closes an already opened modal using its reference.
Show Task<BitModalReference> (Dictionary<string, object>? parameters) Shows a new BitModal with a custom component with parameters as its content.
Show Task<BitModalReference> (BitModalParameters? modalParameters) Shows a new BitModal with a custom component as its content with custom parameters for the modal.
Show Task<BitModalReference> (Dictionary<string, object>? parameters, BitModalParameters? modalParameters) Shows a new BitModal with a custom component as its content with custom parameters for the custom component and the modal.
  • On this page