Using Spinners on a Blazor .razor page. Use of a Spinner library.

A typical snippet of code is used with Blazor Client pages to delay page rendering of elements that display data that needs to be sourced over Http from the server, until it is received:

@if (Status == "null")

An alternative is to display a Spinner instead of the Uploading ... paragraph. These are typically a rotating set of dots in a circle or line. There is a good set of Spinners for Blazor available as a repository at BlazorPro.SpinKit on GitHub. There are 12 Spinners as below:


Larger view of Spinners here


Largely taken from the repository ReadMe.

The Spinner package can be installed to a Blazor app using:

Install-Package BlazorPro.Spinkit


1. Add Imports

Add the following to your _Imports.razor

@using BlazorPro.Spinkit

2. Add a Spinner component (from the list above) eg:

@if (Status == "null")
    <Pulse />

3. Add a reference to the style sheet

Add the following line to the head tag of your _Host.cshtml (Blazor Server) or index.html (Blazor WebAssembly).

    <link href="_content/BlazorPro.Spinkit/spinkit.min.css" rel="stylesheet" />


These Spinners are simple to include and work well. Hats off to Ed Charbeneau. I came across Blazor Spinners in a presentation earlier in the year on Channel9.


Can’t show Blazor Spinners (with animation) here as these pages are generated using Jekyll which uses Markdown; not ASP.NET Core. So the animations above are an Animated Gif captured from a running Blazor app. I’ve blogged about this in my next post.

  Next: > Jekyll-Markdown
 This Category Links 
Category:Blazor Index:Blazor
  Next: > Blazor
<  Prev:   Blazor