Blazorise SpinKit component
Show lightweight, CSS-based loading indicators.
To use the SpinKit component, install the Blazorise.SpinKit package first.
Installation
NuGet
Install extension from NuGet.Hide code example
Copy code
dotnet add package Blazorise.SpinKit
Imports
In your main _Imports.razor add:Hide code example
Copy code
@using Blazorise.SpinKit
Static files
Add these links inside the<head> section:
<link href="_content/Blazorise.SpinKit/blazorise.spinkit.css?v=2.4.0.0" rel="stylesheet" />
Hide code example
Copy code
Update
wwwroot/index.html.
Basic example
A basic spinner with default settings.Hide code example
Copy code
<SpinKit Type="SpinKitType.Plane" />
Color
The color can be changed with a Blazorise color variant.Hide code example
Copy code
<SpinKit Type="SpinKitType.Plane" Color="Color.Success" />
Hex Color
The color can be changed with HEX value.Hide code example
Copy code
<SpinKit Type="SpinKitType.Plane" HexColor="#ff4a3d" />
Size
Size can be changed using predefined size variants.Hide code example
Copy code
<SpinKit Type="SpinKitType.Plane" Size="Size.Small" />
Custom colorsNew
Combine contextual colors and custom CSS colors withColor.
Primary
Lavender
Accent
Hide code example
Copy code
<Row> <Column ColumnSize="ColumnSize.IsFull.OnMobile.Is4.OnTablet" Margin="Margin.Is3.FromBottom"> <Paragraph>Primary</Paragraph> <SpinKit Type="SpinKitType.Chase" Color="Color.Primary" /> </Column> <Column ColumnSize="ColumnSize.IsFull.OnMobile.Is4.OnTablet" Margin="Margin.Is3.FromBottom"> <Paragraph>Lavender</Paragraph> <SpinKit Type="SpinKitType.Chase" Color="@("#DBB5E6")" /> </Column> <Column ColumnSize="ColumnSize.IsFull.OnMobile.Is4.OnTablet" Margin="Margin.Is3.FromBottom"> <Paragraph>Accent</Paragraph> <SpinKit Type="SpinKitType.Chase" Color="@CssColor.Variable( "--spinner-accent", "#0F766E" )" /> </Column> </Row>
API
See the API reference for the parameters, events, methods, and related types available to the components covered on this page.