BlazorSpinner 2.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package BlazorSpinner --version 2.1.0                
NuGet\Install-Package BlazorSpinner -Version 2.1.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="BlazorSpinner" Version="2.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BlazorSpinner --version 2.1.0                
#r "nuget: BlazorSpinner, 2.1.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 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                

.NET CI/CD Nuget Azure Static Web Apps CI/CD

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 Screen Shot

Setup

  1. Install the library from Nuget: https://www.nuget.org/packages/BlazorSpinner/
  2. Add "@using BlazorSpinner" in your _Imports.razor
  3. Add "builder.Services.AddScoped<SpinnerService>();" in your Program.cs file
    • Or Add "builder.Services.AddScoped<LoadingService>();" in your Program.cs file
  4. Add "<Spinner></Spinner>" to your MainLayout.razor file
    • Or Add "<Loading></Loading>" to your MainLayout.razor file
  5. 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)
  6. 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.0.0 467 8/22/2024
2.1.0 5,779 3/20/2024
2.0.0 297 3/13/2024
1.5.0 2,506 2/4/2024
1.4.2 8,058 7/17/2023
1.4.1 3,739 2/27/2023
1.4.0 490 2/27/2023
1.3.0 29,924 3/9/2022
1.2.0 5,251 11/26/2021
1.1.0 33,711 2/15/2021

v2.1.0: Add new 'Loading' text component