BlazorSpinner 2.1.0
See the version list below for details.
dotnet add package BlazorSpinner --version 2.1.0
NuGet\Install-Package BlazorSpinner -Version 2.1.0
<PackageReference Include="BlazorSpinner" Version="2.1.0" />
paket add BlazorSpinner --version 2.1.0
#r "nuget: BlazorSpinner, 2.1.0"
// Install BlazorSpinner as a Cake Addin #addin nuget:?package=BlazorSpinner&version=2.1.0 // Install BlazorSpinner as a Cake Tool #tool nuget:?package=BlazorSpinner&version=2.1.0
BlazorSpinner
BlazorSpinner is a loading spinner that can be included in Blazor applications. It has a simple service that can be called to "show" or "hide" the spinner.
Demo
Demo link: https://red-bay-06d0ccf10.1.azurestaticapps.net
This is a screen shot of the spinner
Setup
- Install the library from Nuget: https://www.nuget.org/packages/BlazorSpinner/
- Add "
@using BlazorSpinner
" in your _Imports.razor - Add "
builder.Services.AddScoped<SpinnerService>();
" in your Program.cs file- Or Add "
builder.Services.AddScoped<LoadingService>();
" in your Program.cs file
- Or Add "
- Add "
<Spinner></Spinner>
" to your MainLayout.razor file- Or Add "
<Loading></Loading>
" to your MainLayout.razor file
- Or Add "
- On any page you want to call the spinner from, inject the SpinnerService into it:
@inject BlazorSpinner.SpinnerService _spinnerService
- Or Add
@inject BlazorSpinner.LoadingService _loadingService
- (NOTE: You can also do this in other service to, just inject it via the constructor)
- Or Add
- Call
_spinnerService.Show()
or_spinnerService.Hide()
to "Show" or "Hide" the spinner.- If you are using the text loading spinner, adjust this call to use the _loadingService.
Call the spinner on any long-running calls or processes (such as API calls).
Credit
BlazorSpinner uses an icon (https://fontawesome.com/icons/circle-notch?style=solid) from FontAwesome. SVG is directly embedded in this library. Height, Width, Color are modified. For more details, please refer to the license at FontAwesome: https://fontawesome.com/license
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. net9.0 was computed. 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. |
-
net8.0
- Microsoft.AspNetCore.Components (>= 8.0.1)
- Microsoft.AspNetCore.Components.Web (>= 8.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
v2.1.0: Add new 'Loading' text component