Giter Site home page Giter Site logo

gcardinale / blazorspinner Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dahln/blazorspinner

0.0 0.0 0.0 415 KB

A loading spinner with overlay for Blazor apps

Home Page: https://www.nuget.org/packages/BlazorSpinner/

License: GNU General Public License v3.0

C# 13.21% HTML 86.79%

blazorspinner's Introduction

.NET CI/CD Nuget Azure Static Web Apps CI/CD

BlazorSpinner

BlazorSpinner is a loading spinner that can be included in Blazor applications. It has a simple service that can be called to "show" or "hide" the spinner.

Demo

Demo link: https://red-bay-06d0ccf10.1.azurestaticapps.net

This is a screen shot of the spinner Screen Shot

Setup

  1. Install the library from Nuget: https://www.nuget.org/packages/BlazorSpinner/
  2. Add "@using BlazorSpinner" in your _Imports.razor
  3. Add "builder.Services.AddScoped<SpinnerService>();" in your Program.cs file
  4. Add "<Spinner></Spinner>" to your MainLayout.razor file
  5. On any page you want to call the spinner from, inject the SpinnerService into it: @inject BlazorSpinner.SpinnerService _spinnerService (NOTE: You can also do this in other service to, just inject it via the constructor)
  6. Call _spinnerService.Show() or _spinnerService.Hide() to "Show" or "Hide" the spinner.

Call the spinner on any long-running calls or processes (such as API calls).

Credit

BlazorSpinner uses an icon (https://fontawesome.com/icons/circle-notch?style=solid) from FontAwesome. SVG is directly embedded in this library. Height, Width, Color are modified. For more details, please refer to the license at FontAwesome: https://fontawesome.com/license

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.