Blazored.Modal 1.0.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Blazored.Modal --version 1.0.0                
NuGet\Install-Package Blazored.Modal -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Blazored.Modal" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Blazored.Modal --version 1.0.0                
#r "nuget: Blazored.Modal, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Blazored.Modal as a Cake Addin
#addin nuget:?package=Blazored.Modal&version=1.0.0

// Install Blazored.Modal as a Cake Tool
#tool nuget:?package=Blazored.Modal&version=1.0.0                

Blazored Modal

This is a JavaScript free modal implementation for Blazor and Razor Components applications.

Getting Setup

You can install the package via the NuGet package manager just search for Blazored.Modal. You can also install via PowerShell using the following command.

Install-Package Blazored.Modal

Or via the dotnet CLI.

dotnet add package Blazored.Modal

1. Register Services

First, you will need to add the following line to your applications Startup.ConfigureServices method.

public void ConfigureServices(IServiceCollection services)
{
    services.AddBlazoredModal();
}

2. Add Imports

Second, add the following to your _ViewImports.cshtml

@using Blazored
@using Blazored.Modal.Services

@addTagHelper *, Blazored.Modal

3. Add Modal Component

Third and finally you will need to add the <BlazoredModal /> component in your applications MainLayout.cshtml.

Usage

In order to show the modal, you have to inject the IModalService into the component or service you want to invoke the modal. You can then call the Show method passing in the title for the modal and the type of the component you want the modal to display.

For example, say I have a component called Movies which I want to display in the modal and I want to call it from the Index component on a button click.

@page "/"
@inject IModalService Modal

<h1>Hello, world!</h1>

Welcome to Blazored Modal.

<button onclick="@(() => Modal.Show("My Movies", typeof(Movies)))" class="btn btn-primary">View Movies</button>
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (17)

Showing the top 5 NuGet packages that depend on Blazored.Modal:

Package Downloads
Lookif.UI.Component

Some predefined components. It contains: *Crud page *Form *Dropdown - Selective *Grid ---- Blazored.Modal and Blazored.Toast are used in this project.

chd.UI.Base.Contracts

Package Description

Cosmos.Common.AspNetCore.Blazor

Cosmos (Corporate Software Modular System) Blazor component library.

Jakar.Extensions.Blazor

Extensions to aid in development.

ElsaDashboard.Application

Elsa is a set of workflow libraries and tools that enable lean and mean workflowing capabilities in any .NET Core application. This package provides a dashboard application using Blazor.

GitHub repositories (5)

Showing the top 5 popular GitHub repositories that depend on Blazored.Modal:

Repository Stars
aws/aws-lambda-dotnet
Libraries, samples and tools to help .NET Core developers develop AWS Lambda functions.
MUnique/OpenMU
This project aims to create an easy to use, extendable and customizable server for a MMORPG called "MU Online".
hamed-shirbandi/TaskoMask
Task management system based on .NET 8 with Microservices, DDD, CQRS, Event Sourcing and Testing Concepts
Jcparkyn/nodexr
Graphical regular expression editor
melihercan/WebRTCme
A cross-platform framework for adding WebRTC support to .NET MAUI, Blazor, and Desktop applications by using a single unified .NET/C# API.
Version Downloads Last updated
7.3.1 172,969 2/20/2024
7.3.0 1,782 2/20/2024
7.2.0 43,086 1/18/2024
7.1.0 527,352 10/14/2022
7.0.0 46,630 9/17/2022
7.0.0-preiew.4 646 8/15/2022
7.0.0-preiew.3 853 7/14/2022
7.0.0-preiew.2 11,819 3/28/2022
7.0.0-preiew.1 938 3/9/2022
6.0.1 1,012,402 1/16/2021
6.0.0 16,840 1/4/2021
5.1.0 132,419 9/17/2020
5.0.3 29,887 8/5/2020
5.0.2 9,220 7/20/2020
5.0.1 4,488 7/13/2020
5.0.0 1,489 7/13/2020
4.1.0 106,521 4/6/2020
4.0.0 20,113 3/13/2020
3.1.2 22,448 2/13/2020
3.1.1 2,715 2/10/2020
3.1.0 19,173 1/19/2020
3.0.0 25,255 12/6/2019
2.3.0 13,727 10/11/2019
2.2.0 1,644 10/7/2019
2.1.1 7,732 9/25/2019
2.1.0 900 9/17/2019
2.0.7 941 9/5/2019
2.0.6 1,038 8/13/2019
2.0.5 671 7/25/2019
2.0.4 350 7/25/2019
2.0.3 367 7/24/2019
2.0.2 668 6/13/2019
2.0.1 1,270 6/1/2019
2.0.0 1,380 5/3/2019
1.1.3 1,340 3/9/2019
1.1.2 1,304 2/13/2019
1.1.1 1,292 2/9/2019
1.1.0 1,252 2/2/2019
1.0.3 1,290 2/1/2019
1.0.2 1,269 2/1/2019
1.0.1 1,255 2/1/2019
1.0.0 1,826 1/31/2019