BlazorKit.Spinners 0.7.26

dotnet add package BlazorKit.Spinners --version 0.7.26
                    
NuGet\Install-Package BlazorKit.Spinners -Version 0.7.26
                    
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="BlazorKit.Spinners" Version="0.7.26" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BlazorKit.Spinners" Version="0.7.26" />
                    
Directory.Packages.props
<PackageReference Include="BlazorKit.Spinners" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BlazorKit.Spinners --version 0.7.26
                    
#r "nuget: BlazorKit.Spinners, 0.7.26"
                    
#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.
#:package BlazorKit.Spinners@0.7.26
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BlazorKit.Spinners&version=0.7.26
                    
Install as a Cake Addin
#tool nuget:?package=BlazorKit.Spinners&version=0.7.26
                    
Install as a Cake Tool

BlazorKit.Spinners

A Blazor library for loading spinners.

Screenshots

App Screenshot

Installation

With Package Manager:

Install-Package BlazorKit.Spinners

With .NET CLI:

dotnet add package BlazorKit.Spinners

How to use it

If the project is Blazor WebAssembly, it is also necessary to modify the INDEX.HTML page present in the WWWROOT folder of the CLIENT project as follows

Between the HEAD tags add:

<link href="_content/BlazorKit.Spinners/spinners.css" rel="stylesheet" />
<link href="_content/BlazorKit.Spinners/keyframes.css" rel="stylesheet" />

Between the BODY tags edit the APP section so that it looks like this:

<div id="app">
  <div class="loaderWrapper">
    <span class="loaderMain"></span>
  </div>
</div>

Razor

<SpinnerLoader IsLoading="isLoading" HasError="hasError" Size="46px" AccentColor="#3498db" Color="White" Center="true" Spinner="SpinnerTemplate.Loader1">
    <ContentTemplate>
        <table class="table">
            ...
        </table>
    </ContentTemplate>
    <ErrorContentTemplate>
        <tr>
            <td colspan="4">
                <div class="alert alert-danger">Fail</div>
            </td>
        </tr>
    </ErrorContentTemplate>
</SpinnerLoader>

Code Behind

    private bool hasError = false;
    private bool isLoading = true;

    protected override async Task OnInitializedAsync()
    {
        isLoading = true;
        await Task.Delay(5000);
        try
        {
            forecasts = await Http.GetFromJsonAsync<WeatherForecast[]>("sample-data/weather.json");
        }
        catch (Exception)
        {
            hasError = true;
        }
        finally
        {
            isLoading = false;
        }
    }
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  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.  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.  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. 
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
0.7.26 359 4/4/2023
0.7.21 430 11/28/2022
0.7.19 509 8/24/2022
0.7.16 1,434 2/9/2022
0.7.15 522 2/9/2022
0.7.14 524 2/9/2022
0.7.6 551 2/4/2022
0.7.5 539 1/26/2022
0.7.4 531 1/26/2022
0.7.3 543 1/25/2022
0.7.2-g711710daf6 263 1/25/2022
0.7.1-gdb80b3ccb2 268 1/25/2022
0.7.0-ge2190874ab 273 1/25/2022
0.7.0-g204c2d61c9 270 1/25/2022
0.6.1-gc85b086e38 292 11/5/2021
0.6.1-g95908fa74c 314 1/25/2022
0.6.1-g07f1feb716 260 1/25/2022
0.6.0-ga538d3e490 303 11/5/2021
0.5.0-g93f2077247 307 11/5/2021
0.5.0-g016fe6c632 313 11/4/2021