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.
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.
// Install BlazorKit.Spinners as a Cake Addin
#addin nuget:?package=BlazorKit.Spinners&version=0.7.26

// Install BlazorKit.Spinners as a Cake Tool
#tool nuget:?package=BlazorKit.Spinners&version=0.7.26

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. 
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 237 4/4/2023
0.7.21 328 11/28/2022
0.7.19 425 8/24/2022
0.7.16 1,307 2/9/2022
0.7.15 424 2/9/2022
0.7.14 426 2/9/2022
0.7.6 448 2/4/2022
0.7.5 443 1/26/2022
0.7.4 431 1/26/2022
0.7.3 441 1/25/2022
0.7.2-g711710daf6 176 1/25/2022
0.7.1-gdb80b3ccb2 176 1/25/2022
0.7.0-ge2190874ab 188 1/25/2022
0.7.0-g204c2d61c9 182 1/25/2022
0.6.1-gc85b086e38 200 11/5/2021
0.6.1-g95908fa74c 187 1/25/2022
0.6.1-g07f1feb716 168 1/25/2022
0.6.0-ga538d3e490 210 11/5/2021
0.5.0-g93f2077247 214 11/5/2021
0.5.0-g016fe6c632 221 11/4/2021