Extensions0121.MudBlazor
0.3.0
dotnet add package Extensions0121.MudBlazor --version 0.3.0
NuGet\Install-Package Extensions0121.MudBlazor -Version 0.3.0
<PackageReference Include="Extensions0121.MudBlazor" Version="0.3.0" />
<PackageVersion Include="Extensions0121.MudBlazor" Version="0.3.0" />
<PackageReference Include="Extensions0121.MudBlazor" />
paket add Extensions0121.MudBlazor --version 0.3.0
#r "nuget: Extensions0121.MudBlazor, 0.3.0"
#:package Extensions0121.MudBlazor@0.3.0
#addin nuget:?package=Extensions0121.MudBlazor&version=0.3.0
#tool nuget:?package=Extensions0121.MudBlazor&version=0.3.0
MudBlazor.Extensions0121
Overview
MudBlazor.Extensions0121 is a component library of commonly used custom components with MudBlazor, services or other types of code.
Getting Started
Add the following line to the startup services of your project:
services.AddMudBlazorExtensions0121();
Add the following line to end of the body element contents:
<script src="_content/Extensions0121.MudBlazor/MudBlazor.Extensions0121.js"></script>
Components & Services
Processing
Add the following line to the mainlayout.razor of your project:
<Processing/>
Google ReCaptcha
Setup
Add an additional line to the end of the body element contents where reCAPTCHA_site_key is replace with your key:
<script src="https://www.google.com/recaptcha/api.js?render=reCAPTCHA_site_key"></script>
Add the using statement to _imports.razor, the component using the service or a service requiring this service:
using MudBlazor.Extensions0121.GRecaptchaV3
When applying the services on startup, you must also pass in the Google ReCaptcha Site Key and Secret Key.
services.AddMudBlazorExtensions0121(opt => opt.GRecaptchaV3SiteKey = "YourSecret");
Add the following line to the mainlayout.razor of your project:
<GRecaptchaV3/>
Usage
Client side, inject the service into your component or service and use it like so:
@inject IGRecaptchaV3State GRecaptcha
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>
@code {
private void IncrementCount()
{
GRecaptcha.ExecuteRecaptcha("test");
}
}
"Test" is the action and part of the server side validation. See Google ReCaptcha documentation for more information on implementing the server side.
License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- Blazored.LocalStorage (>= 4.5.0)
- FluentResults (>= 4.0.0)
- Microsoft.AspNetCore.Components.Web (>= 9.0.9)
- MudBlazor (>= 8.12.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.