BlazorKit.Spinners
0.7.21
.NET 6.0
dotnet add package BlazorKit.Spinners --version 0.7.21
NuGet\Install-Package BlazorKit.Spinners -Version 0.7.21
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.21" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BlazorKit.Spinners --version 0.7.21
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: BlazorKit.Spinners, 0.7.21"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. 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.21
// Install BlazorKit.Spinners as a Cake Tool
#tool nuget:?package=BlazorKit.Spinners&version=0.7.21
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
BlazorKit.Spinners
A Blazor library for loading spinners.
Screenshots
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 | Versions |
---|---|
.NET | net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows |
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- BlazorComponentUtilities (>= 1.8.0)
- Microsoft.AspNetCore.Components.Web (>= 6.0.11)
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.21 | 151 | 11/28/2022 |
0.7.19 | 238 | 8/24/2022 |
0.7.16 | 1,119 | 2/9/2022 |
0.7.15 | 242 | 2/9/2022 |
0.7.14 | 246 | 2/9/2022 |
0.7.6 | 267 | 2/4/2022 |
0.7.5 | 259 | 1/26/2022 |
0.7.4 | 254 | 1/26/2022 |
0.7.3 | 258 | 1/25/2022 |
0.7.2-g711710daf6 | 89 | 1/25/2022 |
0.7.1-gdb80b3ccb2 | 81 | 1/25/2022 |
0.7.0-ge2190874ab | 84 | 1/25/2022 |
0.7.0-g204c2d61c9 | 86 | 1/25/2022 |
0.6.1-gc85b086e38 | 115 | 11/5/2021 |
0.6.1-g95908fa74c | 89 | 1/25/2022 |
0.6.1-g07f1feb716 | 86 | 1/25/2022 |
0.6.0-ga538d3e490 | 115 | 11/5/2021 |
0.5.0-g93f2077247 | 120 | 11/5/2021 |
0.5.0-g016fe6c632 | 114 | 11/4/2021 |
0.7.0